/* iCollect Everything — Add Item Modal Styles */

/* ===== OVERLAY ===== */
.ice-add-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 10000;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.ice-add-overlay.open { display: flex; justify-content: center; align-items: flex-start; }

/* ===== MODAL CONTAINER ===== */
.ice-add-modal {
	background: #fff;
	width: 100%;
	max-width: 680px;
	margin: 40px 16px;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 80px);
}

/* ===== HEADER ===== */
.ice-add-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #e5e5ea;
	flex-shrink: 0;
}
.ice-add-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1c1c1e;
}
.ice-add-close {
	background: #e5e5ea;
	border: none;
	width: 28px; height: 28px;
	border-radius: 50%;
	cursor: pointer;
	color: #636366;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.ice-add-close:hover { background: #d1d1d6; }

/* ===== TABS ===== */
.ice-add-tabs {
	display: flex;
	border-bottom: 1px solid #e5e5ea;
	flex-shrink: 0;
	padding: 0 20px;
}
.ice-add-tab {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #8e8e93;
	border: none;
	background: none;
	cursor: pointer;
	position: relative;
	white-space: nowrap;
	font-family: inherit;
}
.ice-add-tab.active { color: var(--ice-accent, #2269c3); }
.ice-add-tab.active::after {
	content: '';
	position: absolute;
	bottom: -1px; left: 0; right: 0;
	height: 2px;
	background: var(--ice-accent, #2269c3);
	border-radius: 1px;
}

/* ===== CONTENT AREA ===== */
.ice-add-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
}

/* ===== TAB PANELS ===== */
.ice-add-panel { display: none; }
.ice-add-panel.active { display: block; }

/* ===== SEARCH PANEL ===== */
.ice-search-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	align-items: center;
}
.ice-search-field-select {
	padding: 10px 12px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 14px;
	background: #f2f2f7;
	min-width: 120px;
	font-family: inherit;
	height: 40px;
}
.ice-search-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	height: 40px;
}
.ice-search-input:focus, .ice-search-field-select:focus {
	outline: none;
	border-color: var(--ice-accent, #2269c3);
	box-shadow: 0 0 0 2px rgba(var(--ice-accent-rgb, 34,105,195), 0.2);
}

/* ===== BARCODE PANEL ===== */
.ice-barcode-row {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}
.ice-barcode-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 14px;
	font-family: monospace;
}
.ice-barcode-input:focus {
	outline: none;
	border-color: var(--ice-accent, #2269c3);
	box-shadow: 0 0 0 2px rgba(var(--ice-accent-rgb, 34,105,195), 0.2);
}
.ice-barcode-btn {
	padding: 8px 16px;
	border: none;
	border-radius: 8px;
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
}
.ice-barcode-btn:hover { opacity: 0.9; }
.ice-barcode-btn:disabled { opacity: 0.5; cursor: default; }

/* ===== SCAN PANEL ===== */
.ice-scan-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.ice-scan-camera-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 400px;
	margin-bottom: 4px;
}
.ice-scan-camera-row label {
	font-size: 12px;
	font-weight: 600;
	color: #636366;
	flex-shrink: 0;
}
.ice-scan-camera-select {
	flex: 1;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d1d1d6;
	font-size: 12px;
	background: #f2f2f7;
	font-family: inherit;
	padding: 0 8px;
	min-width: 0;
}
.ice-scan-viewfinder {
	width: 100%;
	max-width: 400px;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	min-height: 200px;
	position: relative;
}
.ice-scan-viewfinder video {
	width: 100% !important;
	height: auto !important;
	border-radius: 12px;
	display: block;
}
.ice-scan-viewfinder canvas.drawingBuffer {
	position: absolute;
	top: 0; left: 0;
	width: 100% !important;
	height: 100% !important;
}
.ice-scan-instructions {
	font-size: 13px;
	color: #8e8e93;
	text-align: center;
	padding: 4px 0 8px;
}
.ice-scan-app-hint {
	font-size: 11px;
	color: #ff3b30;
	text-align: center;
	padding: 0 0 8px;
}
.ice-scan-supplement-label {
	font-size: 12px;
	color: #007aff;
	text-align: center;
	padding: 6px 10px;
	font-weight: 500;
}

/* ===== BULK SCAN TOGGLE ===== */
.ice-bulk-scan-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}
.ice-bulk-scan-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.ice-bulk-scan-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.ice-bulk-scan-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #ccc;
	border-radius: 22px;
	transition: .3s;
}
.ice-bulk-scan-slider:before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 2px;
	bottom: 2px;
	background: #fff;
	border-radius: 50%;
	transition: .3s;
}
.ice-bulk-scan-toggle input:checked + .ice-bulk-scan-slider {
	background: var(--ice-accent, #007aff);
}
.ice-bulk-scan-toggle input:checked + .ice-bulk-scan-slider:before {
	transform: translateX(18px);
}
.ice-bulk-scan-label {
	font-size: 12px;
	font-weight: 500;
	color: #636366;
}

/* ===== INLINE SCAN TOAST ===== */
.ice-scan-toast {
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	margin: 6px 10px;
}
.ice-scan-toast.success {
	background: rgba(52,199,89,0.12);
	color: #34c759;
	border: 1px solid rgba(52,199,89,0.25);
}
.ice-scan-toast.error {
	background: rgba(255,59,48,0.12);
	color: #ff3b30;
	border: 1px solid rgba(255,59,48,0.25);
}

/* ===== SCAN IMAGE PANEL (Card/Stamp) ===== */
.ice-scanimage-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px 6px;
	justify-content: flex-end;
}
.ice-scanimage-container {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
	margin: 0 10px;
	min-height: 240px;
}
.ice-scanimage-container video {
	width: 100%;
	display: block;
	min-height: 240px;
}
.ice-scanimage-btn {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	border: none;
	background: none;
	cursor: pointer;
	padding: 0;
	z-index: 1;
}
.ice-scanimage-btn-ring {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 3px solid rgba(255,255,255,0.5);
	position: relative;
}
.ice-scanimage-btn-ring::after {
	content: '';
	position: absolute;
	top: 4px; left: 4px; right: 4px; bottom: 4px;
	background: #fff;
	border-radius: 50%;
}
.ice-scanimage-btn-label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 11px;
	font-weight: 600;
	color: #000;
	white-space: normal;
	width: 50px;
	text-align: center;
	line-height: 1.2;
	pointer-events: none;
}
#ice-scanimage-countdown {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	z-index: 2;
}
.ice-scanimage-countdown-num {
	font-size: 96px;
	font-weight: bold;
	color: #fff;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.ice-scanimage-cancel-btn {
	margin-top: 16px;
	padding: 8px 20px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.5);
	background: transparent;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	font-family: inherit;
}
.ice-scanimage-cancel-btn:hover {
	background: rgba(255,255,255,0.1);
}

/* Override html5-qrcode default styles */
#ice-scan-viewfinder img[alt="Info icon"] { display: none !important; }
#ice-scan-viewfinder > div:first-child { border: none !important; }
#ice-scan-viewfinder #qr-shaded-region { border-radius: 8px !important; }
#ice-scan-viewfinder a { display: none !important; }

/* ===== STATUS MESSAGE ===== */
.ice-add-status {
	text-align: center;
	padding: 12px;
	color: #8e8e93;
	font-size: 13px;
}
.ice-add-status .spinner {
	display: inline-block;
	width: 16px; height: 16px;
	border: 2px solid #d1d1d6;
	border-top-color: var(--ice-accent, #2269c3);
	border-radius: 50%;
	animation: ice-spin 0.6s linear infinite;
	margin-right: 6px;
	vertical-align: middle;
}
@keyframes ice-spin { to { transform: rotate(360deg); } }

/* ===== TITLE LIST (Step 1: clickable title rows) ===== */
.ice-title-list { margin-top: 8px; }
.ice-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #e5e5ea;
	border-radius: 8px;
	margin-bottom: 4px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}
.ice-title-row:hover {
	background: #f2f2f7;
	border-color: var(--ice-accent, #2269c3);
}
.ice-title-row-text { flex: 1; min-width: 0; }
.ice-title-row-name {
	font-size: 13px;
	font-weight: 600;
	color: #1c1c1e;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ice-title-row-sub {
	font-size: 11px;
	color: #8e8e93;
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ice-title-row-count {
	font-size: 11px;
	color: #aeaeb2;
	flex-shrink: 0;
	white-space: nowrap;
}
.ice-title-row-arrow {
	font-size: 18px;
	color: #c7c7cc;
	flex-shrink: 0;
	line-height: 1;
}

/* ===== ITEM GRID (Step 2: 2-column grid of items) ===== */
.ice-grid-section { margin-top: 4px; }
.ice-item-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 8px;
}
.ice-item-grid.ice-sectioned-mode {
	display: block;
}
.ice-item-grid.ice-sectioned-mode .ice-item-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 0;
}
.ice-grid-item {
	display: flex;
	gap: 8px;
	padding: 8px;
	border: 1px solid #e5e5ea;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, opacity 0.2s;
	min-height: 120px;
	overflow: hidden;
	position: relative;
}
.ice-grid-item:hover {
	background: #f2f2f7;
	border-color: var(--ice-accent, #2269c3);
}
.ice-grid-item.adding {
	opacity: 0.5;
	pointer-events: none;
}
.ice-grid-item.added {
	border-color: #34C759;
	background: rgba(52,199,89,0.05);
}
.ice-grid-img {
	width: 80px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
	background: #f2f2f7;
}
.ice-grid-no-img {
	display: flex;
	align-items: center;
	justify-content: center;
}
.ice-no-rounded .ice-grid-img {
	border-radius: 0;
}
.ice-card-mode .ice-grid-img {
	object-fit: contain;
}
.ice-grid-labels {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 2px;
}
.ice-grid-label1 {
	font-size: 12px;
	font-weight: 600;
	color: #1c1c1e;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ice-grid-label2, .ice-grid-label3 {
	font-size: 11px;
	color: #8e8e93;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ice-grid-item .ice-duplicate-warning {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	background: #FFF3CD;
	border-top: 1px solid #FFD60A;
	border-radius: 0 0 7px 7px;
	padding: 8px;
	font-size: 11px;
}

/* ===== MANUAL ENTRY LINK ===== */
.ice-manual-divider {
	text-align: center;
	margin: 20px 0 12px;
	position: relative;
}
.ice-manual-divider::before {
	content: '';
	position: absolute;
	left: 0; right: 0;
	top: 50%;
	height: 1px;
	background: #e5e5ea;
}
.ice-manual-divider span {
	background: #fff;
	padding: 0 12px;
	position: relative;
	color: #8e8e93;
	font-size: 12px;
}
.ice-manual-btn {
	display: block;
	width: 100%;
	padding: 10px;
	border: 1px dashed #d1d1d6;
	border-radius: 10px;
	background: none;
	color: var(--ice-accent, #2269c3);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
}
.ice-manual-btn:hover { background: #f2f2f7; }

/* ===== BACK BUTTON ===== */
.ice-back-btn {
	background: none;
	border: none;
	color: var(--ice-accent, #2269c3);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: inherit;
}
.ice-back-btn:hover { text-decoration: underline; }

/* ===== MANUAL ENTRY FORM ===== */
.ice-manual-form { margin-top: 8px; }
.ice-manual-form .ice-form-group { margin-bottom: 12px; }
.ice-manual-form .ice-form-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #636366;
	margin-bottom: 4px;
}
.ice-manual-form .ice-form-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e5e5ea;
}
.ice-manual-form .ice-form-actions button {
	padding: 10px 24px;
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-manual-form .ice-btn-save {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
}
.ice-manual-form .ice-btn-save:hover { opacity: 0.9; }
.ice-manual-form .ice-btn-save:disabled { opacity: 0.5; cursor: default; }
.ice-manual-form .ice-btn-cancel {
	background: #e5e5ea;
	color: #1c1c1e;
}
.ice-manual-form .ice-btn-cancel:hover { background: #d1d1d6; }

/* ===== IMAGE DROP ZONE ===== */
.ice-add-drop-zone {
	border: 2px dashed #d1d1d6;
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	color: #8e8e93;
	font-size: 13px;
	margin-bottom: 12px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.ice-add-drop-zone:hover, .ice-add-drop-zone.dragover {
	border-color: var(--ice-accent, #2269c3);
	background: rgba(var(--ice-accent-rgb, 34,105,195), 0.05);
}
.ice-add-drop-zone a { color: var(--ice-accent, #2269c3); cursor: pointer; text-decoration: underline; }
.ice-add-image-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.ice-add-image-thumb {
	position: relative;
	width: 64px; height: 64px;
}
.ice-add-image-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	border-radius: 6px;
}
.ice-add-image-thumb .img-remove {
	position: absolute;
	top: -4px; right: -4px;
	width: 18px; height: 18px;
	background: #FF3B30;
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	cursor: pointer;
}

/* ===== TOAST ===== */
.ice-add-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	padding: 10px 24px;
	border-radius: 10px;
	font-size: 14px;
	z-index: 10001;
	display: none;
	font-weight: 500;
}
.ice-add-toast.show { display: block; }
.ice-add-toast.success { background: #34C759; color: #fff; }
.ice-add-toast.error { background: #FF3B30; color: #fff; }
.ice-add-toast.info { background: #1c1c1e; color: #fff; }

/* ===== DUPLICATE WARNING ===== */
.ice-duplicate-warning {
	background: #FFF3CD;
	border: 1px solid #FFD60A;
	border-radius: 8px;
	padding: 12px;
	margin: 8px 0;
	font-size: 13px;
	color: #1c1c1e;
}
.ice-duplicate-warning .ice-dup-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}
.ice-duplicate-warning .ice-dup-actions button {
	padding: 6px 14px;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-dup-add-btn { background: var(--ice-accent, #2269c3); color: var(--ice-accent-text); }
.ice-dup-cancel-btn { background: #e5e5ea; color: #1c1c1e; }

/* ===== EDIT FIELD STYLES (for manual entry form) ===== */
/* These mirror styles from web_item_styles.css for consistency */
.ice-manual-form .edit-field {
	display: block;
	margin-bottom: 10px;
}
.ice-manual-form .edit-field input[type="text"],
.ice-manual-form .edit-field input[type="number"],
.ice-manual-form .edit-field input[type="date"],
.ice-manual-form .edit-field textarea,
.ice-manual-form .edit-field select {
	width: 100%;
	padding: 8px 12px;
	border: 1.5px solid #d1d1d6;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.2s;
	box-sizing: border-box;
}
.ice-manual-form .edit-field input:focus,
.ice-manual-form .edit-field textarea:focus,
.ice-manual-form .edit-field select:focus {
	outline: none;
	border-color: var(--ice-accent, #2269c3);
	box-shadow: 0 0 0 3px rgba(var(--ice-accent-rgb, 34,105,195), 0.25);
}
.ice-manual-form .edit-field textarea {
	min-height: 60px;
	resize: vertical;
}
.ice-manual-form .edit-field .star-rating-edit { display: flex; gap: 4px; }
.ice-manual-form .edit-field .star-rating-edit .star {
	font-size: 24px; cursor: pointer; color: #d1d1d6; transition: color 0.15s; user-select: none;
}
.ice-manual-form .edit-field .star-rating-edit .star.filled { color: #FF9500; }
.ice-manual-form .edit-field .toggle-edit { display: flex; align-items: center; gap: 8px; }
.ice-manual-form .edit-field .toggle-edit input[type="checkbox"] {
	width: 20px; height: 20px; accent-color: var(--ice-accent, #2269c3);
}
.ice-manual-form .edit-field .readonly-field {
	padding: 8px 12px;
	background: #f2f2f7;
	border-radius: 8px;
	font-size: 14px;
	color: #8e8e93;
	font-style: italic;
}
.ice-manual-form .edit-field .currency-edit {
	display: flex;
	gap: 8px;
	align-items: center;
}
.ice-manual-form .edit-field .currency-edit select { flex: 0 0 auto; min-width: 100px; width: auto; }
.ice-manual-form .edit-field .currency-edit input { flex: 1; }
.ice-manual-form .edit-field .person-list { display: flex; flex-direction: column; gap: 6px; }
.ice-manual-form .edit-field .person-row {
	display: flex;
	gap: 6px;
	align-items: center;
}
.ice-manual-form .edit-field .person-row input { flex: 1; min-width: 0; }
.ice-manual-form .edit-field .person-row .btn-remove-person {
	background: #FF3B30;
	color: #fff;
	border: none;
	border-radius: 6px;
	width: 28px;
	height: 28px;
	font-size: 16px;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ice-manual-form .edit-field .btn-add-person,
.ice-manual-form .edit-field .btn-add-drilldown {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	border: none;
	border-radius: 8px;
	padding: 6px 14px;
	font-size: 13px;
	cursor: pointer;
	margin-top: 4px;
	align-self: flex-start;
	font-family: inherit;
}
.ice-manual-form .edit-field .drilldown-edit { display: flex; flex-direction: column; gap: 6px; }
.ice-manual-form .edit-field .drilldown-row {
	display: flex;
	gap: 6px;
	align-items: center;
}
.ice-manual-form .edit-field .drilldown-row select {
	flex: 1;
	min-width: 0;
	padding: 6px 8px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
	background: #F2F2F7;
}
.ice-manual-form .edit-field .btn-remove-drilldown {
	background: #FF3B30;
	color: #fff;
	border: none;
	border-radius: 6px;
	width: 28px;
	height: 28px;
	font-size: 16px;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* Multi-select trigger & modal */
.ice-manual-form .multi-select-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #f2f2f7;
	border: 1px solid #d1d1d6;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
	color: #1c1c1e;
	font-family: inherit;
}
.ice-manual-form .multi-select-trigger:hover { background: #e5e5ea; }
.ice-manual-form .multi-select-trigger .ms-count {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	font-size: 11px;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 10px;
	min-width: 18px;
	text-align: center;
}
/* Autocomplete */
.ice-manual-form .ac-wrapper { position: relative; flex: 1; }
.ice-manual-form .ac-wrapper input { width: 100%; }
.ice-manual-form .ac-suggestions {
	display: none; position: absolute; top: 100%; left: 0; right: 0;
	background: #fff; border: 1px solid #d1d1d6; border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 9999;
	max-height: 200px; overflow-y: auto; margin-top: 2px;
}
.ice-manual-form .ac-suggestions.open { display: block; }
.ice-manual-form .ac-suggestions .ac-item {
	padding: 8px 12px; font-size: 13px; cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
}
.ice-manual-form .ac-suggestions .ac-item:last-child { border-bottom: none; }
.ice-manual-form .ac-suggestions .ac-item:hover { background: var(--ice-accent, #2269c3); color: var(--ice-accent-text); }
.ice-manual-form .ac-suggestions .ac-hint {
	padding: 8px 12px; font-size: 12px; color: #8e8e93; font-style: italic;
}
/* Studio tags */
.ice-manual-form .studio-edit { display: flex; flex-direction: column; gap: 6px; }
.ice-manual-form .studio-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ice-manual-form .studio-tag {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 10px; background: #E8E8ED; border-radius: 8px;
	font-size: 13px; color: #1c1c1e;
}
.ice-manual-form .studio-tag .tag-remove {
	background: none; border: none; color: #FF3B30;
	font-size: 14px; cursor: pointer; padding: 0 2px; line-height: 1;
}

/* ===== MULTI-SELECT OVERLAY & MODAL ===== */
/* Needed on collection page (web_item_styles.css not loaded there) */
/* z-index 10100 to appear above the add item overlay (10000) */
.ice-add-overlay .multi-select-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.4);
	z-index: 10100;
	justify-content: center;
	align-items: center;
}
.ice-add-overlay .multi-select-overlay.open { display: flex; }
.ice-add-overlay .multi-select-modal {
	background: #fff;
	border-radius: 14px;
	width: 90%;
	max-width: 400px;
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.ice-add-overlay .multi-select-modal .ms-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #e5e5ea;
	font-weight: 600;
	font-size: 16px;
}
.ice-add-overlay .multi-select-modal .ms-header button {
	background: none; border: none;
	color: var(--ice-accent, #2269c3);
	font-size: 14px; font-weight: 600;
	cursor: pointer; font-family: inherit;
}
.ice-add-overlay .multi-select-modal .ms-body {
	overflow-y: auto;
	padding: 8px 0;
	-webkit-overflow-scrolling: touch;
}
.ice-add-overlay .multi-select-modal .ms-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
}
.ice-add-overlay .multi-select-modal .ms-option:hover { background: #f2f2f7; }
.ice-add-overlay .multi-select-modal .ms-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ice-accent, #2269c3); flex-shrink: 0; }
.ice-add-overlay .multi-select-modal .ms-footer {
	padding: 12px 16px;
	border-top: 1px solid #e5e5ea;
	text-align: right;
}
.ice-add-overlay .multi-select-modal .ms-footer button {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text); border: none; border-radius: 10px;
	padding: 8px 24px; font-size: 14px; font-weight: 600;
	cursor: pointer; font-family: inherit;
}
.ice-add-overlay .multi-select-modal .ms-footer button:hover { opacity: 0.9; }

/* ===== GRID TOOLBAR (sectioned grid) ===== */
.ice-grid-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid #e5e5ea;
	margin-bottom: 8px;
	flex-wrap: wrap;
}
.ice-grid-sort-select {
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d1d1d6;
	font-size: 12px;
	background: #f2f2f7;
	font-family: inherit;
	padding: 0 8px;
}
.ice-grid-sort-dir-btn {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d1d1d6;
	background: #f2f2f7;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ice-grid-sort-dir-btn:hover { background: #e5e5ea; }
.ice-grid-filter-btn {
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d1d1d6;
	background: #f2f2f7;
	cursor: pointer;
	font-size: 12px;
	padding: 0 10px;
	font-family: inherit;
}
.ice-grid-filter-btn:hover { background: #e5e5ea; }
.ice-grid-filter-btn.active {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	border-color: var(--ice-accent, #2269c3);
}
.ice-grid-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	background: #FF3B30;
	color: #fff;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-weight: 700;
	flex-shrink: 0;
	margin-left: 2px;
}
.ice-grid-count {
	font-size: 11px;
	color: #8e8e93;
	margin-left: auto;
}

/* ===== SECTION HEADERS (sectioned grid) ===== */
.ice-section-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	background: #f2f2f7;
	border-radius: 8px;
	margin: 6px 0 4px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	user-select: none;
	color: #1c1c1e;
}
.ice-section-header:hover { background: #e8e8ed; }
.ice-section-chevron {
	font-size: 8px;
	color: #8e8e93;
	width: 12px;
	text-align: center;
}
.ice-section-count {
	font-size: 11px;
	color: #8e8e93;
	margin-left: auto;
	font-weight: 400;
}

/* ===== FILTER MODAL ===== */
.ice-filter-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.4);
	z-index: 10200;
	display: flex;
	justify-content: center;
	align-items: center;
}
.ice-filter-modal {
	background: #fff;
	border-radius: 14px;
	width: 90%;
	max-width: 420px;
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.ice-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #e5e5ea;
	font-weight: 600;
	font-size: 16px;
	color: #1c1c1e;
	flex-shrink: 0;
}
.ice-filter-close-btn {
	background: #e5e5ea;
	border: none;
	width: 28px; height: 28px;
	border-radius: 50%;
	font-size: 16px;
	line-height: 28px;
	text-align: center;
	cursor: pointer;
	color: #636366;
}
.ice-filter-close-btn:hover { background: #d1d1d6; }
.ice-filter-body {
	overflow-y: auto;
	padding: 8px 16px;
	-webkit-overflow-scrolling: touch;
	flex: 1;
}
.ice-filter-field-section {
	margin-bottom: 16px;
}
.ice-filter-field-label {
	font-size: 12px;
	font-weight: 600;
	color: #636366;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.ice-filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 14px;
	cursor: pointer;
	color: #1c1c1e;
}
.ice-filter-option input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--ice-accent, #2269c3);
	flex-shrink: 0;
}
.ice-filter-footer {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 12px 16px;
	border-top: 1px solid #e5e5ea;
	flex-shrink: 0;
}
.ice-filter-clear-btn {
	background: #e5e5ea;
	color: #1c1c1e;
	border: none;
	border-radius: 10px;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-filter-clear-btn:hover { background: #d1d1d6; }
.ice-filter-apply-btn {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	border: none;
	border-radius: 10px;
	padding: 8px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-filter-apply-btn:hover { opacity: 0.9; }

/* ===== SEARCH MODE PICKER (tc_* drilldown/name toggle) ===== */
.ice-search-mode-picker {
	display: flex;
	gap: 0;
	background: #f2f2f7;
	border-radius: 8px;
	padding: 2px;
	margin-bottom: 12px;
}
.ice-mode-btn {
	flex: 1;
	padding: 7px 12px;
	border: none;
	border-radius: 6px;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	color: #636366;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s, color 0.15s;
}
.ice-mode-btn.active {
	background: #fff;
	color: #1c1c1e;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ===== DRILLDOWN UI ===== */
.ice-drilldown-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin-bottom: 10px;
	font-size: 12px;
	min-height: 24px;
}
.ice-dd-crumb {
	color: var(--ice-accent, #2269c3);
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: 500;
}
.ice-dd-crumb:hover { background: rgba(var(--ice-accent-rgb, 34,105,195), 0.1); }
.ice-dd-crumb-sep { color: #c7c7cc; font-size: 10px; }
.ice-dd-crumb-current {
	color: #1c1c1e;
	font-weight: 600;
	padding: 2px 6px;
}
.ice-drilldown-options { margin-top: 4px; }
.ice-dd-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border: 1px solid #e5e5ea;
	border-radius: 10px;
	margin-bottom: 6px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	font-size: 14px;
	color: #1c1c1e;
}
.ice-dd-option:hover {
	background: #f2f2f7;
	border-color: var(--ice-accent, #2269c3);
}
.ice-dd-option-text { flex: 1; min-width: 0; }
.ice-dd-option-arrow {
	font-size: 20px;
	color: #c7c7cc;
	flex-shrink: 0;
	line-height: 1;
}
.ice-dd-start-over {
	background: none;
	border: none;
	color: var(--ice-accent, #2269c3);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 8px;
	margin-left: auto;
	font-family: inherit;
}
.ice-dd-start-over:hover { text-decoration: underline; }

/* ===== DRILLDOWN FILTER INPUT ===== */
.ice-drilldown-filter {
	display: block;
	width: calc(100% - 20px);
	margin: 6px 10px;
	padding: 8px 12px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	background: #f5f5f7;
	box-sizing: border-box;
}
.ice-drilldown-filter:focus {
	border-color: var(--ice-accent, #007aff);
	background: #fff;
}

/* ===== BULK SCAN TOAST (rich card with image, details, delete) ===== */
.ice-bulk-toast {
	margin: 6px 10px;
	border-radius: 10px;
	background: #fff;
	border: 2px solid #34c759;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	overflow: hidden;
	cursor: pointer;
}
.ice-bulk-toast-content {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
}
.ice-bulk-toast-img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 6px;
	flex-shrink: 0;
	background: #f5f5f7;
}
.ice-bulk-toast-info {
	flex: 1;
	min-width: 0;
}
.ice-bulk-toast-saved {
	font-size: 10px;
	font-weight: 700;
	color: #34c759;
	margin-bottom: 2px;
}
.ice-bulk-toast-title {
	font-size: 12px;
	font-weight: 600;
	color: #1d1d1f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ice-bulk-toast-subtitle {
	font-size: 11px;
	color: #666;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ice-bulk-toast-delete {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: rgba(255,59,48,0.1);
	color: #ff3b30;
	font-size: 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.ice-bulk-toast-delete:hover {
	background: rgba(255,59,48,0.2);
}

/* ===== VARIANT SELECTION (scan image tc_*) ===== */
.ice-item-grid.ice-variant-mode {
	display: block;
}
.ice-variant-primary {
	padding: 12px;
}
.ice-variant-header {
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	margin-bottom: 10px;
	color: #1d1d1f;
}
.ice-variant-match {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #f5f5f7;
	border-radius: 10px;
	padding: 10px;
}
.ice-variant-match-img {
	width: 80px;
	height: 100px;
	object-fit: contain;
	border-radius: 8px;
	flex-shrink: 0;
}
.ice-no-rounded .ice-variant-match-img {
	border-radius: 0;
}
.ice-variant-match-info {
	flex: 1;
	min-width: 0;
}
.ice-variant-match-title {
	font-size: 14px;
	font-weight: 600;
	color: #1d1d1f;
	margin-bottom: 2px;
}
.ice-variant-match-detail {
	font-size: 12px;
	color: #666;
	margin-bottom: 2px;
}
.ice-variant-keep-btn {
	display: inline-block;
	margin-top: 6px;
	padding: 6px 16px;
	border-radius: 8px;
	border: none;
	background: var(--ice-accent, #007aff);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-variant-keep-btn:hover {
	opacity: 0.85;
}
.ice-variant-keep-btn.adding {
	opacity: 0.5;
	pointer-events: none;
}
.ice-variant-label {
	font-size: 13px;
	color: #666;
	text-align: center;
	padding: 8px 12px 4px;
}
.ice-variant-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	padding: 8px 12px;
}
.ice-variant-grid .ice-grid-item {
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ice-variant-grid .ice-grid-img {
	width: 100%;
	height: auto;
	aspect-ratio: 3/4;
	object-fit: contain;
}
.ice-variant-grid .ice-grid-item.adding {
	opacity: 0.5;
	pointer-events: none;
}

/* ===== BULK ADD ===== */
.ice-grid-bulk-btn {
	height: 32px;
	border-radius: 6px;
	border: 1px solid #d1d1d6;
	background: #f2f2f7;
	cursor: pointer;
	font-size: 12px;
	padding: 0 10px;
	font-family: inherit;
	white-space: nowrap;
}
.ice-grid-bulk-btn:hover { background: #e5e5ea; }
.ice-grid-bulk-btn.active {
	background: #34C759;
	color: #fff;
	border-color: #34C759;
}
.ice-grid-item .ice-bulk-check {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #34C759;
	color: #fff;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	pointer-events: none;
	z-index: 2;
}
.ice-grid-item.bulk-selectable {
	cursor: pointer;
}
.ice-grid-item.bulk-selected {
	border-color: #34C759;
	background: rgba(52,199,89,0.05);
}
.ice-bulk-bar {
	position: sticky;
	bottom: 0;
	background: #fff;
	border-top: 1px solid #e5e5ea;
	padding: 10px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	z-index: 5;
	margin-top: 8px;
}
.ice-bulk-add-btn {
	background: var(--ice-accent, #2269c3);
	color: var(--ice-accent-text);
	border: none;
	border-radius: 10px;
	padding: 10px 28px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.ice-bulk-add-btn:hover { opacity: 0.9; }
.ice-bulk-add-btn:disabled { opacity: 0.5; cursor: default; }
.ice-bulk-select-all-btn {
	background: none;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	font-family: inherit;
	color: #636366;
}
.ice-bulk-select-all-btn:hover { background: #f2f2f7; }

/* ===== BULK PROGRESS OVERLAY ===== */
.ice-bulk-progress-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 10300;
	display: flex;
	justify-content: center;
	align-items: center;
}
.ice-bulk-progress-box {
	background: #fff;
	border-radius: 14px;
	padding: 28px 32px;
	text-align: center;
	box-shadow: 0 8px 32px rgba(0,0,0,0.25);
	max-width: 320px;
	width: 90%;
}
.ice-bulk-progress-box .spinner {
	display: inline-block;
	width: 24px; height: 24px;
	border: 3px solid #d1d1d6;
	border-top-color: var(--ice-accent, #2269c3);
	border-radius: 50%;
	animation: ice-spin 0.6s linear infinite;
	margin-bottom: 12px;
}
.ice-bulk-progress-msg {
	font-size: 14px;
	color: #1c1c1e;
	font-weight: 500;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
	.ice-add-modal {
		margin: 0;
		border-radius: 0;
		max-height: 100dvh;
		min-height: 100dvh;
	}
	.ice-add-overlay.open { align-items: stretch; }
	.ice-add-content { padding-bottom: 40px; }
	.ice-search-row { flex-direction: column; }
	.ice-search-field-select { width: 100%; }
	.ice-barcode-row { flex-direction: column; }
	.ice-scan-viewfinder { max-width: 100%; min-height: 240px; }
	.ice-scan-camera-row { max-width: 100%; }
	.ice-scanimage-container { margin: 0; border-radius: 0; }
}
@media (max-width: 400px) {
	.ice-item-grid { grid-template-columns: 1fr; }
}

/* ===== DARK THEME ===== */
body.dark-theme .ice-add-modal { background: #1c1c1e; }
body.dark-theme .ice-add-header { border-color: #38383a; }
body.dark-theme .ice-add-header h2 { color: #f2f2f7; }
body.dark-theme .ice-add-close { background: #38383a; color: #aeaeb2; }
body.dark-theme .ice-add-close:hover { background: #48484a; }
body.dark-theme .ice-add-tabs { border-color: #38383a; }
body.dark-theme .ice-add-tab { color: #8e8e93; }
body.dark-theme .ice-add-tab.active { color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-add-tab.active::after { background: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-search-input,
body.dark-theme .ice-search-field-select,
body.dark-theme .ice-barcode-input {
	background: #2c2c2e; border-color: #48484a; color: #f2f2f7;
}
body.dark-theme .ice-search-input:focus,
body.dark-theme .ice-search-field-select:focus,
body.dark-theme .ice-barcode-input:focus {
	border-color: var(--ice-accent-dark, #4d9aff);
	box-shadow: 0 0 0 2px rgba(var(--ice-accent-dark-rgb, 77,154,255), 0.2);
}
body.dark-theme .ice-barcode-btn { background: var(--ice-accent-dark, #4d9aff); }
/* Dark: scanner */
body.dark-theme .ice-scan-viewfinder { background: #000; }
body.dark-theme .ice-scan-instructions { color: #8e8e93; }
body.dark-theme .ice-scan-camera-row label { color: #8e8e93; }
body.dark-theme .ice-scan-camera-select { background: #2c2c2e; border-color: #48484a; color: #f2f2f7; }
/* Dark: status spinner */
body.dark-theme .ice-add-status .spinner { border-color: #48484a; border-top-color: var(--ice-accent-dark, #4d9aff); }
/* Dark: title list */
body.dark-theme .ice-title-row { border-color: #38383a; }
body.dark-theme .ice-title-row:hover { background: #2c2c2e; border-color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-title-row-name { color: #f2f2f7; }
body.dark-theme .ice-title-row-arrow { color: #636366; }
/* Dark: item grid */
body.dark-theme .ice-grid-item { background: #1c1c1e; border-color: #38383a; }
body.dark-theme .ice-grid-item:hover { background: #2c2c2e; border-color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-grid-item.added { border-color: #34C759; background: rgba(52,199,89,0.08); }
body.dark-theme .ice-grid-img { background: #2c2c2e; }
body.dark-theme .ice-grid-label1 { color: #f2f2f7; }
body.dark-theme .ice-grid-item .ice-duplicate-warning { background: #3a3a1e; border-color: #FFD60A; color: #f2f2f7; }
body.dark-theme .ice-manual-divider::before { background: #38383a; }
body.dark-theme .ice-manual-divider span { background: #1c1c1e; }
body.dark-theme .ice-manual-btn { border-color: #48484a; color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-manual-btn:hover { background: #2c2c2e; }
body.dark-theme .ice-back-btn { color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-manual-form .ice-form-label { color: #8e8e93; }
body.dark-theme .ice-manual-form .ice-form-actions { border-color: #38383a; }
body.dark-theme .ice-manual-form .ice-btn-save { background: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-manual-form .ice-btn-cancel { background: #38383a; color: #f2f2f7; }
body.dark-theme .ice-manual-form .ice-btn-cancel:hover { background: #48484a; }
body.dark-theme .ice-add-drop-zone { border-color: #48484a; color: #8e8e93; }
body.dark-theme .ice-add-drop-zone:hover,
body.dark-theme .ice-add-drop-zone.dragover {
	border-color: var(--ice-accent-dark, #4d9aff);
	background: rgba(var(--ice-accent-dark-rgb, 77,154,255), 0.1);
}
body.dark-theme .ice-add-drop-zone a { color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-add-toast.info { background: #2c2c2e; }
body.dark-theme .ice-duplicate-warning { background: #3a3a1e; border-color: #FFD60A; color: #f2f2f7; }
body.dark-theme .ice-dup-add-btn { background: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-dup-cancel-btn { background: #48484a; color: #f2f2f7; }
/* Dark theme: edit fields in manual form */
body.dark-theme .ice-manual-form .edit-field input[type="text"],
body.dark-theme .ice-manual-form .edit-field input[type="number"],
body.dark-theme .ice-manual-form .edit-field input[type="date"],
body.dark-theme .ice-manual-form .edit-field textarea,
body.dark-theme .ice-manual-form .edit-field select { background: #2c2c2e; color: #fff; border-color: #48484a; }
body.dark-theme .ice-manual-form .edit-field input:focus,
body.dark-theme .ice-manual-form .edit-field textarea:focus,
body.dark-theme .ice-manual-form .edit-field select:focus { border-color: var(--ice-accent-dark, #4d9aff); box-shadow: 0 0 0 3px rgba(var(--ice-accent-dark-rgb, 77,154,255), 0.25); }
body.dark-theme .ice-manual-form .edit-field .readonly-field { background: #2c2c2e; color: #8e8e93; }
body.dark-theme .ice-manual-form .edit-field .star-rating-edit .star { color: #48484a; }
body.dark-theme .ice-manual-form .edit-field .star-rating-edit .star.filled { color: #FF9500; }
body.dark-theme .ice-manual-form .multi-select-trigger { background: #2c2c2e; border-color: #48484a; color: #fff; }
body.dark-theme .ice-manual-form .multi-select-trigger:hover { background: #3a3a3c; }
body.dark-theme .ice-manual-form .ac-suggestions { background: #2c2c2e; border-color: #48484a; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
body.dark-theme .ice-manual-form .ac-suggestions .ac-item { border-bottom-color: #38383a; color: #fff; }
body.dark-theme .ice-manual-form .ac-suggestions .ac-item:hover { background: var(--ice-accent-dark, #4d9aff); color: var(--ice-accent-dark-text); }
body.dark-theme .ice-manual-form .studio-tag { background: #2c2c2e; color: #fff; }
body.dark-theme .ice-manual-form .drilldown-row select { background: #2c2c2e; color: #fff; border-color: #48484a; }
body.dark-theme .ice-manual-form .edit-field .currency-edit select { background: #2c2c2e; color: #fff; border-color: #48484a; }
/* Dark theme: multi-select modal inside add item overlay */
body.dark-theme .ice-add-overlay .multi-select-modal { background: #1c1c1e; color: #fff; }
body.dark-theme .ice-add-overlay .multi-select-modal .ms-header { border-bottom-color: #38383a; }
body.dark-theme .ice-add-overlay .multi-select-modal .ms-option:hover { background: #2c2c2e; }
body.dark-theme .ice-add-overlay .multi-select-modal .ms-body { color: #fff; }
body.dark-theme .ice-add-overlay .multi-select-modal .ms-footer { border-top-color: #38383a; }
/* Dark theme: solid accent add buttons */
body.dark-theme .ice-manual-form .edit-field .btn-add-person,
body.dark-theme .ice-manual-form .edit-field .btn-add-drilldown { background: var(--ice-accent-dark, #4d9aff); color: var(--ice-accent-dark-text); }
/* Dark theme: grid toolbar */
body.dark-theme .ice-grid-toolbar { border-bottom-color: #38383a; }
body.dark-theme .ice-grid-sort-select { background: #2c2c2e; border-color: #48484a; color: #f2f2f7; }
body.dark-theme .ice-grid-sort-dir-btn { background: #2c2c2e; border-color: #48484a; color: #f2f2f7; }
body.dark-theme .ice-grid-sort-dir-btn:hover { background: #3a3a3c; }
body.dark-theme .ice-grid-filter-btn { background: #2c2c2e; border-color: #48484a; color: #f2f2f7; }
body.dark-theme .ice-grid-filter-btn:hover { background: #3a3a3c; }
body.dark-theme .ice-grid-filter-btn.active { background: var(--ice-accent-dark, #4d9aff); color: var(--ice-accent-dark-text); border-color: var(--ice-accent-dark, #4d9aff); }
/* Dark theme: section headers */
body.dark-theme .ice-section-header { background: #2c2c2e; color: #f2f2f7; }
body.dark-theme .ice-section-header:hover { background: #3a3a3c; }
/* Dark theme: filter modal */
body.dark-theme .ice-filter-modal { background: #1c1c1e; }
body.dark-theme .ice-filter-header { border-bottom-color: #38383a; color: #f2f2f7; }
body.dark-theme .ice-filter-close-btn { background: #38383a; color: #aeaeb2; }
body.dark-theme .ice-filter-close-btn:hover { background: #48484a; }
body.dark-theme .ice-filter-body { color: #f2f2f7; }
body.dark-theme .ice-filter-option { color: #f2f2f7; }
body.dark-theme .ice-filter-footer { border-top-color: #38383a; }
body.dark-theme .ice-filter-clear-btn { background: #38383a; color: #f2f2f7; }
body.dark-theme .ice-filter-clear-btn:hover { background: #48484a; }
body.dark-theme .ice-filter-apply-btn { background: var(--ice-accent-dark, #4d9aff); }
/* Dark theme: mode picker */
body.dark-theme .ice-search-mode-picker { background: #2c2c2e; }
body.dark-theme .ice-mode-btn { color: #8e8e93; }
body.dark-theme .ice-mode-btn.active { background: #48484a; color: #f2f2f7; box-shadow: none; }
/* Dark theme: drilldown filter */
body.dark-theme .ice-drilldown-filter {
	background: #2c2c2e;
	border-color: #3a3a3c;
	color: #fff;
}
body.dark-theme .ice-drilldown-filter:focus {
	border-color: var(--ice-accent-dark, #4d9aff);
	background: #1c1c1e;
}
/* Dark theme: drilldown */
body.dark-theme .ice-dd-crumb { color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-dd-crumb:hover { background: rgba(var(--ice-accent-dark-rgb, 77,154,255), 0.15); }
body.dark-theme .ice-dd-crumb-current { color: #f2f2f7; }
body.dark-theme .ice-dd-option { border-color: #38383a; color: #f2f2f7; }
body.dark-theme .ice-dd-option:hover { background: #2c2c2e; border-color: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-dd-option-arrow { color: #636366; }
body.dark-theme .ice-dd-start-over { color: var(--ice-accent-dark, #4d9aff); }
/* Dark theme: bulk scan toast */
body.dark-theme .ice-bulk-toast { background: #2c2c2e; border-color: #34c759; }
body.dark-theme .ice-bulk-toast-img { background: #1c1c1e; }
body.dark-theme .ice-bulk-toast-title { color: #f2f2f7; }
body.dark-theme .ice-bulk-toast-subtitle { color: #8e8e93; }
body.dark-theme .ice-bulk-toast-delete { background: rgba(255,59,48,0.15); }
body.dark-theme .ice-bulk-toast-delete:hover { background: rgba(255,59,48,0.25); }
/* Dark theme: variant selection */
body.dark-theme .ice-variant-header { color: #f2f2f7; }
body.dark-theme .ice-variant-match { background: #2c2c2e; }
body.dark-theme .ice-variant-match-title { color: #f2f2f7; }
body.dark-theme .ice-variant-match-detail { color: #8e8e93; }
body.dark-theme .ice-variant-label { color: #8e8e93; }
body.dark-theme .ice-variant-keep-btn { background: var(--ice-accent-dark, #4d9aff); }
/* Dark theme: bulk add */
body.dark-theme .ice-grid-bulk-btn { background: #2c2c2e; border-color: #48484a; color: #f2f2f7; }
body.dark-theme .ice-grid-bulk-btn:hover { background: #3a3a3c; }
body.dark-theme .ice-grid-bulk-btn.active { background: #34C759; color: #fff; border-color: #34C759; }
body.dark-theme .ice-grid-item.bulk-selected { border-color: #34C759; background: rgba(52,199,89,0.08); }
body.dark-theme .ice-bulk-bar { background: #1c1c1e; border-top-color: #38383a; }
body.dark-theme .ice-bulk-add-btn { background: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-bulk-select-all-btn { border-color: #48484a; color: #8e8e93; }
body.dark-theme .ice-bulk-select-all-btn:hover { background: #2c2c2e; }
body.dark-theme .ice-bulk-progress-box { background: #2c2c2e; }
body.dark-theme .ice-bulk-progress-msg { color: #f2f2f7; }
/* Dark theme: bulk scan toggle */
body.dark-theme .ice-bulk-scan-slider { background: #48484a; }
body.dark-theme .ice-bulk-scan-toggle input:checked + .ice-bulk-scan-slider { background: var(--ice-accent-dark, #4d9aff); }
body.dark-theme .ice-bulk-scan-label { color: #8e8e93; }
/* Dark theme: inline scan toast */
body.dark-theme .ice-scan-toast.success { background: rgba(52,199,89,0.15); color: #34c759; border-color: rgba(52,199,89,0.3); }
body.dark-theme .ice-scan-toast.error { background: rgba(255,59,48,0.15); color: #ff3b30; border-color: rgba(255,59,48,0.3); }
/* Dark theme: scan image */
body.dark-theme .ice-scanimage-container { background: #000; }
