/* Searchable picker (shared by crew app and admin). */
.tmtp-layer {
	--p-bg: #ffffff; --p-fg: #0f172a; --p-muted: #64748b; --p-line: #e2e8f0; --p-hover: #f1f5f9; --p-field: #f8fafc;
	--p-accent: var(--accent, #2563eb);
	position: fixed; inset: 0; z-index: 100000; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif; line-height: 1.35;
}
@media (prefers-color-scheme: dark) {
	html.tmt-app-doc .tmtp-layer { --p-bg: #161b26; --p-fg: #e6e9ef; --p-muted: #94a3b8; --p-line: #273041; --p-hover: #1f2633; --p-field: #0f141d; }
	html.tmt-app-doc .tmtp-badge-ok { background: #0f2e1c; color: #86efac; }
	html.tmt-app-doc .tmtp-badge-warn { background: #3a1414; color: #fca5a5; }
}
html.tmtp-lock, html.tmtp-lock body { overflow: hidden; }
.tmtp-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .5); opacity: 0; transition: opacity .18s; }
.tmtp-sheet {
	position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; display: flex; flex-direction: column;
	background: var(--p-bg); color: var(--p-fg); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25);
	transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom);
}
.tmtp-layer.is-open .tmtp-backdrop { opacity: 1; }
.tmtp-layer.is-open .tmtp-sheet { transform: none; }
.tmtp-layer.is-closing .tmtp-backdrop { opacity: 0; }
.tmtp-layer.is-closing .tmtp-sheet { transform: translateY(100%); }
@media (min-width: 700px) {
	.tmtp-sheet { left: 50%; top: 12vh; bottom: auto; width: 520px; max-height: 70vh; border-radius: 16px; transform: translate(-50%, 12px) scale(.98); opacity: 0; transition: transform .18s, opacity .18s; }
	.tmtp-layer.is-open .tmtp-sheet { transform: translate(-50%, 0); opacity: 1; }
	.tmtp-layer.is-closing .tmtp-sheet { transform: translate(-50%, 12px); opacity: 0; }
	.tmtp-grab { display: none; }
}
.tmtp-head { padding: 8px 16px 10px; border-bottom: 1px solid var(--p-line); }
.tmtp-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--p-line); margin: 0 auto 8px; }
.tmtp-title-row { display: flex; align-items: center; justify-content: space-between; }
.tmtp-title { margin: 4px 0 8px; font-size: 17px; font-weight: 700; color: var(--p-fg); }
.tmtp-close { border: 0; background: var(--p-hover); color: var(--p-fg); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.tmtp-search { width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--p-line); background: var(--p-field); color: var(--p-fg); font-size: 16px; outline: none; }
.tmtp-search:focus { border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 25%, transparent); }
.tmtp-list { list-style: none; margin: 0; padding: 6px 8px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tmtp-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 12px; border-radius: 12px; cursor: pointer; margin: 0; }
.tmtp-item:hover, .tmtp-item.is-active { background: var(--p-hover); }
.tmtp-item.is-selected { background: color-mix(in srgb, var(--p-accent) 12%, transparent); }
.tmtp-item.is-selected .tmtp-label::after { content: " ✓"; color: var(--p-accent); font-weight: 800; }
.tmtp-item.is-none .tmtp-label { color: var(--p-muted); font-style: italic; }
.tmtp-item.is-disabled { opacity: .45; cursor: not-allowed; }
.tmtp-label { font-size: 16px; font-weight: 600; grid-column: 1; }
.tmtp-sub { font-size: 13px; color: var(--p-muted); grid-column: 1; }
.tmtp-badge { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--p-hover); color: var(--p-muted); }
.tmtp-badge-ok { background: #dcfce7; color: #166534; }
.tmtp-badge-warn { background: #fee2e2; color: #991b1b; }
.tmtp-empty { display: none; text-align: center; color: var(--p-muted); padding: 24px; margin: 0; }

/* Enhanced <select> field (admin) */
.tmtp-hidden { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.tmtp-field { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 220px; max-width: 100%; min-height: 36px; padding: 6px 12px; border: 1px solid #c3c4c7; border-radius: 8px; background: #fff; color: #1d2327; font-size: 14px; text-align: left; cursor: pointer; }
.tmtp-field:hover { border-color: var(--accent, #2563eb); }
.tmtp-field:focus { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; }
.tmtp-field.is-placeholder .tmtp-field-label { color: #787c82; }
.tmtp-field-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmtp-chev { color: #787c82; font-size: 12px; }
