/* Advanced Search UI Styles - Add to your existing CSS */

/* Enhanced Search Container */
.search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	max-width: 740px;
	flex-wrap: nowrap;
}

/* New Search Bar Styles */
.search-box-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
	background: var(--surface);
    border-radius: 4px;
    padding: 2px 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.search-box-wrapper:focus-within {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 0 0 2px rgba(255,255,255,0.5);
}

.search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    padding: 8px !important;
    outline: none !important;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}

.search-icon-btn,
.search-advanced-btn,
.search-people-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
	color: var(--brand);
    border-radius: 4px;
    transition: background-color 0.1s;
    flex-shrink: 0;
}

.search-icon-btn:hover,
.search-advanced-btn:hover,
.search-people-btn:hover {
	background-color: var(--hover);
}

.search-advanced-btn.active,
.search-people-btn.active {
	background-color: var(--selected);
}

body.theme-dark .search-box-wrapper {
	background: #202020;
	border: 1px solid #2a2a2a;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 16px rgba(0,0,0,0.35);
}

body.theme-dark .search-box-wrapper:focus-within {
	box-shadow: 0 0 0 2px rgba(10, 100, 255, 0.35), 0 10px 18px rgba(0,0,0,0.45);
}

body.theme-dark .search-icon-btn,
body.theme-dark .search-advanced-btn,
body.theme-dark .search-people-btn {
	color: #dbe8ff;
}

body.theme-dark .search-icon-btn:hover,
body.theme-dark .search-advanced-btn:hover,
body.theme-dark .search-people-btn:hover {
	background-color: #2a2a2a;
}

.search-scope-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 10px 16px;
	border-radius: 20px;
	background: #f5f7fb;
	border: 1px solid #dce3f3;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 14px rgba(15,23,42,0.1);
	transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	color: #0f172a;
  }

  .search-scope-toggle:hover {
	background: #ffffff;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 18px rgba(15,23,42,0.12);
  }

  .search-scope-toggle.scope-toggle-pending {
	opacity: 0.65;
	pointer-events: none;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  }

  .search-results .search-header {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--surface);
	padding: 16px;
	border-bottom: 1px solid var(--border);
	margin: 0;
  }

  .search-tools-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-left: auto;
  }

  .search-tools-summary {
	font-size: 12px;
	color: var(--muted);
	background: rgba(15, 23, 42, 0.04);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 6px 12px;
	white-space: nowrap;
  }

  .search-tools-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
  }

  .search-tools-trigger .tools-chevron {
	font-size: 11px;
  }

  .search-tools-panel {
	display: none;
	margin: 0 16px 12px;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	box-shadow: var(--shadow);
	position: sticky;
	top: var(--listheader-h, 44px);
	z-index: 39;
	gap: 14px;
	flex-wrap: wrap;
  }

  .search-tools-panel.open {
	display: flex;
  }

	.search-results-toolbox {
	display: grid;
	grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(160px, 0.8fr) auto;
	gap: 14px;
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px 14px;
	box-shadow: var(--shadow);
	}

  .search-results-toolbox .search-scope-toggle,
  .search-tools-panel .search-scope-toggle {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
  }

  .toolbox-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
  }

  .toolbox-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
  }

  .toolbox-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
  }

  .toolbox-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: center;
  }

  .toolbox-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--text);
  }

  .toolbox-pill {
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
  }

  .toolbox-pill.active {
	border-color: var(--brand);
	color: var(--brand);
	box-shadow: 0 0 0 2px rgba(10, 102, 229, 0.18);
  }

  .toolbox-select,
  .toolbox-input {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 13px;
	background: var(--surface);
	color: var(--text);
	min-width: 180px;
  }

  .toolbox-help {
	font-size: 12px;
	color: var(--muted);
  }

  .toolbox-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text);
  }

  .toolbox-hints {
	display: flex;
	flex-direction: column;
	gap: 4px;
  }

  .toolbox-hint {
	font-size: 12px;
	color: var(--muted);
	display: none;
  }

  .toolbox-hint.active {
	display: block;
  }

  .toolbox-actions {
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-left: auto;
  }

  @media (max-width: 1100px) {
	.search-results-toolbox {
		grid-template-columns: 1fr;
	}
	.toolbox-actions {
		align-items: flex-start;
	}
	.search-tools-panel {
		flex-direction: column;
	}
  }

  .search-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
  }

  .search-results-scope {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
  }

  .scope-hints {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 200px;
  }

  .scope-hint {
	display: none;
	font-size: 12px;
	font-weight: 500;
	color: #475569;
	padding-left: 2px;
  }

  .scope-hint.active {
	display: flex;
	align-items: center;
	gap: 6px;
  }

  .scope-hint-icon {
	width: 16px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #0f172a;
  }

  .scope-hint-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
  }

  .scope-copy {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 110px;
  }

  .scope-title {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #475569;
	font-weight: 600;
  }

  .scope-description {
	font-size: 13px;
	color: #0f172a;
	font-weight: 600;
  }

  .scope-options {
	display: inline-flex;
	align-items: center;
	gap: 6px;
  }

  .scope-option {
	border: none;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 12px;
	font-weight: 600;
	color: #0f172a;
	background: rgba(255,255,255,0.88);
	box-shadow: inset 0 0 0 1px rgba(15,23,42,0.08);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  }

  .scope-option.active {
	color: #0a66e5;
	background: #fff;
	box-shadow: inset 0 0 0 2px rgba(10,102,229,0.3);
	transform: translateY(-1px);
  }

  .scope-option:focus-visible {
	outline: 2px solid #0ea5e9;
	outline-offset: 2px;
  }

  .scope-option:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: inset 0 0 0 1px rgba(71,85,105,0.25);
  }

  @media (max-width: 1100px) {
	.scope-copy {
		display: none;
	}
	.search-scope-toggle {
		gap: 6px;
		padding: 8px 12px;
	}
	.scope-option {
		padding: 5px 12px;
	}
  }

  #search-form {
	display: flex;
	align-items: center;
	position: relative;
	background: #f5f7fb;
	border: 1px solid #d7dde7;
	border-radius: 10px;
	padding: 10px 12px 10px 66px;
	width: 100%;
	max-width: 100%;
	box-shadow: 0 1px 2px rgba(15,23,42,0.08);
	transition: border-color 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
  }

  #search-form::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2367748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='7' r='5'/><path d='m11 11 3.5 3.5'/%3E%3C/svg%3E") center/16px 16px no-repeat;
	opacity: 0.9;
	pointer-events: none;
  }

  .search:focus-within #search-form {
	background: #fff;
	border-color: #0a66e5;
	box-shadow: 0 12px 32px rgba(10,102,229,0.16);
  }

  #search-form .search-input {
	border: none;
	background: transparent;
	padding: 6px 10px;
	width: 100%;
	font-size: 14px;
	color: #0f172a;
  }

  #search-form .search-input::placeholder {
	color: #6b7280;
	padding-left: 2px;
  }

  #search-form .search-input:focus {
	outline: none;
  }
  
  .search-toggle {
	background: rgba(255,255,255,0.08);
	border: 0;
	color: #fff;
	padding: 6px 10px;
	cursor: pointer;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	transition: background-color 0.15s ease, color 0.15s ease;
	box-shadow: none;
	}
  
  .search-toggle:hover {
	background: rgba(255,255,255,0.18);
	color: #fff;
	}
  
  .search-toggle.active {
	color: #fff;
	background: rgba(255,255,255,0.22);
	}

  .search-toggle:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
  }

  .search-toggle svg {
	stroke: currentColor;
  }
  
  #saved-searches-toggle svg {
	fill: currentColor;
	stroke: none;
  }
  
  /* Advanced Search Panel */
  .search-advanced {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #d7dde7;
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(15,23,42,0.12);
	z-index: 1200;
	margin-top: 6px;
	display: none;
	min-width: 520px;
	padding: 16px 16px 12px;
  }
  
  .search-advanced.open {
	display: block;
  }

  #search-advanced:not(.open) {
	display: none;
  }

  /* Saved searches panel */
  .saved-searches-panel {
	position: relative;
	width: 100%;
	background: #fff;
	border: 1px solid #d7dde7;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(15,23,42,0.12);
	padding: 0;
	z-index: 1;
	display: none;
	flex-direction: column;
	margin: 12px 0 0 0;
  }

  .saved-searches-panel.open {
	display: flex;
  }

  #saved-searches-panel:not(.open) {
	display: none;
  }

  .saved-searches-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 16px 20px 12px;
	border-bottom: 1px solid var(--border);
  }

  .people-suggestions {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	width: min(540px, 100%);
	background: #fff;
	border: 1px solid #d7dde7;
	border-radius: 12px;
	box-shadow: 0 18px 45px rgba(15,23,42,0.18);
	padding: 6px 0;
	display: none;
	flex-direction: column;
	gap: 2px;
	z-index: 1250;
	max-height: 360px;
	overflow-y: auto;
  }

  .people-suggestions.open {
	display: flex;
  }

  .people-suggestion {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 16px;
	cursor: pointer;
	transition: background-color 0.15s ease;
  }

  .people-suggestion:hover,
  .people-suggestion.active {
	background: #f1f6ff;
  }

  .people-suggestion-name {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: #0f172a;
  }

  .people-suggestion-email {
	font-size: 13px;
	color: #475569;
  }

  .people-suggestion-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	color: #64748b;
	align-items: center;
  }

	body.theme-dark .search-advanced,
	body.theme-dark .saved-searches-panel,
	body.theme-dark .people-suggestions {
	background: var(--surface, #15181d);
	border: 1px solid var(--border, #2a2f36);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
	}

	body.theme-dark .saved-searches-header {
	border-bottom: 1px solid var(--border, #2a2f36);
	}

	body.theme-dark .people-suggestion {
	color: var(--text, #e5e7eb);
	}

	body.theme-dark .people-suggestion:hover,
	body.theme-dark .people-suggestion.active {
	background: rgba(255, 255, 255, 0.06);
	}

	body.theme-dark .people-suggestion-name {
	color: var(--text, #e5e7eb);
	}

	body.theme-dark .people-suggestion-email,
	body.theme-dark .people-suggestion-meta {
	color: var(--muted, #9aa3b2);
	}

  body.theme-dark .search-results-toolbox {
	background: rgba(255, 255, 255, 0.02);
	border-color: var(--border, #2a2f36);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  }

	body.theme-dark .search-tools-summary {
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--border, #2a2f36);
	color: var(--muted, #9aa3b2);
	}

	body.theme-dark .search-tools-trigger {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--border, #2a2f36);
	color: var(--text, #e5e7eb);
	}

	  body.theme-dark .search-tools-panel {
		background: var(--surface, #15181d);
		border-color: var(--border, #2a2f36);
		box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
	  }

  body.theme-dark .search-results-toolbox .search-scope-toggle {
	background: transparent;
	border: none;
	box-shadow: none;
  }

  body.theme-dark .toolbox-pill {
	background: rgba(255, 255, 255, 0.03);
	border-color: var(--border, #2a2f36);
	color: var(--text, #e5e7eb);
  }

  body.theme-dark .toolbox-pill.active {
	border-color: #0a64ff;
	color: #9fc3ff;
	box-shadow: 0 0 0 2px rgba(10, 100, 255, 0.2);
  }

  body.theme-dark .toolbox-select,
  body.theme-dark .toolbox-input {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--border, #2a2f36);
	color: var(--text, #e5e7eb);
  }

  body.theme-dark .toolbox-help,
  body.theme-dark .toolbox-title,
  body.theme-dark .toolbox-hint {
	color: var(--muted, #9aa3b2);
  }

  body.theme-dark .advanced-header {
	background: rgba(255, 255, 255, 0.02);
	border-bottom: 1px solid var(--border, #2a2f36);
  }

  body.theme-dark .advanced-title {
	color: var(--text, #e5e7eb);
  }

  body.theme-dark .advanced-header .search-toggle {
	background: rgba(10, 100, 255, 0.15);
	color: #cfe0ff;
	border: 1px solid rgba(10, 100, 255, 0.35);
  }

  body.theme-dark .advanced-header .search-toggle:hover {
	background: rgba(10, 100, 255, 0.25);
	color: #e0ebff;
  }

  body.theme-dark .advanced-header .search-toggle.active {
	background: rgba(10, 100, 255, 0.35);
	color: #ffffff;
  }

  body.theme-dark .advanced-actions {
	background: rgba(255, 255, 255, 0.02);
	border-top: 1px solid var(--border, #2a2f36);
  }

  body.theme-dark .query-preview {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--border, #2a2f36);
	color: var(--text, #e5e7eb);
  }

  body.theme-dark .query-preview strong {
	color: var(--muted, #9aa3b2);
  }

  .people-suggestion-dot {
	width: 4px;
	height: 4px;
	border-radius: 999px;
	background: currentColor;
	opacity: 0.4;
  }

  .people-suggestion-source {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #0a66e5;
  }

  .people-suggestions.empty::before {
	content: "No people found";
	padding: 8px 16px;
	font-size: 13px;
	color: #94a3b8;
  }

  @media (max-width: 900px) {
	.people-suggestions {
		width: 100%;
	}
  }

  .panel-title {
	font-weight: 600;
	color: var(--text);
  }

  .panel-subtitle {
	font-size: 12px;
	color: var(--muted);
  }

  .saved-searches-body {
	max-height: 260px;
	overflow-y: auto;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
  }

  .saved-searches-empty {
	font-size: 13px;
	color: var(--muted);
	background: #f8fafc;
	border: 1px dashed var(--border);
	border-radius: 10px;
	padding: 12px;
	text-align: center;
  }

  .saved-searches-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
  }

  .saved-search-item {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid #e3e8f4;
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .saved-search-item:hover {
	border-color: #c4d3f6;
	box-shadow: 0 6px 18px rgba(15,23,42,0.08);
  }

  .saved-search-item.pinned {
	border-color: #0a66e5;
	box-shadow: 0 8px 22px rgba(10,102,229,0.15);
  }

  .saved-search-label {
	font-weight: 600;
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 6px;
  }

  .saved-search-label .pin {
	color: #f59e0b;
	font-size: 13px;
  }

  .saved-search-copy {
	flex: 1;
	cursor: pointer;
  }

  .saved-search-copy:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
  }

  .saved-search-meta {
	font-size: 12px;
	color: var(--muted);
	margin-top: 4px;
  }

  .saved-search-query {
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 12px;
	color: var(--muted);
	margin-top: 6px;
	word-break: break-word;
  }

  .saved-search-actions {
	display: flex;
	gap: 6px;
  }

  .saved-search-actions button {
	background: transparent;
	border: 1px solid #dbe1ee;
	border-radius: 8px;
	padding: 4px 8px;
	font-size: 12px;
	cursor: pointer;
	color: var(--text);
  }

  .saved-search-actions button:hover {
	background: #edf2ff;
	border-color: #b4c6ff;
  }

  .saved-search-actions .danger {
	color: #c53030;
	border-color: #fecaca;
  }

  .saved-search-actions .danger:hover {
	background: #fee2e2;
	border-color: #fca5a5;
  }

  .saved-search-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 20px 16px;
	border-top: 1px solid var(--border);
  }

  .saved-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--muted);
  }

  .saved-field input {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
  }

  .saved-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--text);
  }

  .saved-search-form .btn.cta {
	align-self: flex-start;
	padding: 6px 14px;
  }

  .saved-search-note {
	font-size: 11px;
	color: var(--muted);
	padding: 0 20px 16px;
  }

  .advanced-header {
	padding: 16px;
	border-bottom: 1px solid var(--border);
	background: #fafbfc;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
  }

  .advanced-title {
	font-weight: 600;
	color: var(--brand);
  }

  .advanced-header .search-toggle {
	background: #e8eef8;
	color: #0f172a;
	border: 1px solid #d7dde7;
	box-shadow: none;
  }

  .advanced-header .search-toggle:hover {
	background: #dbe8ff;
	color: #0f172a;
  }

  .advanced-header .search-toggle.active {
	background: #c9dbff;
	color: #0f172a;
  }
  
  .advanced-form {
	padding: 16px;
  }
  
  .form-row {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 12px;
	align-items: center;
	margin-bottom: 12px;
  }
  
  .form-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
  }
  
  .form-input {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 14px;
	color: var(--text);
	transition: border-color 0.15s, box-shadow 0.15s;
  }
  
  .form-input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 2px rgba(10, 102, 229, 0.1);
  }
  
  .checkbox-group {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
  }
  
  .checkbox-item {
	display: flex;
	align-items: center;
	gap: 6px;
  }
  
  .checkbox-item input {
	margin: 0;
  }
  
  .checkbox-item label {
	font-size: 13px;
	cursor: pointer;
  }
  
  .date-range {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 8px;
	align-items: center;
  }
  
  .date-range .separator {
	font-size: 12px;
	color: var(--muted);
	text-align: center;
  }
  
  .advanced-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border-top: 1px solid var(--border);
	background: #fafbfc;
  }
  
  .advanced-actions > div {
	display: flex;
	gap: 8px;
  }
  
  /* Search Suggestions */
  .search-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: var(--shadow);
	z-index: 1000;
	margin-top: 4px;
	max-height: 300px;
	overflow-y: auto;
	display: none;
  }
  
  .search-suggestions.open {
	display: block;
  }
  
  .suggestion-item {
	padding: 12px 16px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: background-color 0.15s;
  }
  
  .suggestion-item:hover {
	background: var(--hover);
  }
  
  .suggestion-item:last-child {
	border-bottom: none;
  }
  
  .suggestion-operator {
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	background: #f0f7ff;
	color: var(--brand);
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	min-width: 60px;
	text-align: center;
  }
  
  .suggestion-description {
	color: var(--muted);
	font-size: 12px;
	margin-left: auto;
	font-style: italic;
  }
  
  /* Query Builder Preview */
  .query-preview {
	margin-top: 16px;
	padding: 12px;
	background: #f8f9fa;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 13px;
	color: var(--text);
	line-height: 1.4;
  }
  
  .query-preview strong {
	color: var(--muted);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  }
  
  .query-preview .operator {
	color: var(--brand);
	font-weight: 600;
  }
  
  /* Enhanced search form layout */
  #search-form {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #d7dde7;
	border-radius: 4px;
	padding: 2px 4px;
	width: 100%;
	max-width: 100%;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: border-color 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
  }
  
  .search:focus-within #search-form {
	background: #fff;
	border-color: #0a66e5;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 0 0 2px rgba(255,255,255,0.5);
  }
  
  #search-form .search-input {
	border: none;
	background: transparent;
	padding: 8px;
	width: 100%;
	font-size: 14px;
	color: #0f172a;
  }

  #search-form .search-input::placeholder {
	padding-left: 2px;
  }

  #search-form .search-input::placeholder {
	color: #6b7280;
  }

  #search-form .search-input:focus {
	outline: none;
  }

  /* Hide browser default search icons */
  #search-form .search-input::-webkit-search-decoration,
  #search-form .search-input::-webkit-search-cancel-button,
  #search-form .search-input::-webkit-search-results-button,
  #search-form .search-input::-webkit-search-results-decoration {
    display: none !important;
    -webkit-appearance: none !important;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
	.search-advanced {
	  left: -50px;
	  right: -50px;
	  min-width: auto;
	}

	.saved-searches-panel {
	  margin: 12px 0 0 0;
	  width: 100%;
	}
	
	.form-row {
	  grid-template-columns: 1fr;
	  gap: 4px;
	}
	
	.form-label {
	  font-size: 11px;
	}
	
	.checkbox-group {
	  gap: 12px;
	}
	
	.advanced-actions {
	  flex-direction: column;
	  gap: 12px;
	  align-items: stretch;
	}
	
	.advanced-actions > div {
	  justify-content: center;
	}
  }
  
  @media (max-width: 1024px) {
	.search-advanced {
	  min-width: 400px;
	}
  }
  
  /* Search results highlighting */
  .search-highlight {
	background: rgba(255, 214, 10, 0.18);
	color: var(--text);
	font-weight: 600;
	padding: 0 2px;
	border-radius: 2px;
	box-shadow: inset 0 -1px 0 rgba(255, 214, 10, 0.55);
  }
  
  /* Search status indicators */
  .search-status {
	font-size: 12px;
	color: var(--muted);
	margin-top: 8px;
  }
  
  .search-status .search-count {
	font-weight: 600;
	color: var(--brand);
  }
  
  /* Animation for panels */
  /* (intentionally left blank; legacy broken rules removed) */