:root {
	--tqr-bg: #f6f7f9;
	--tqr-card: #ffffff;
	--tqr-ink: #101828;
	--tqr-muted: #667085;
	--tqr-line: #e4e7ec;
	--tqr-accent: #1f6feb;
	--tqr-wa: #25d366;
	--tqr-sms: #1f6feb;
}

@media (prefers-color-scheme: dark) {
	:root {
		--tqr-bg: #0d1117;
		--tqr-card: #161b22;
		--tqr-ink: #e6edf3;
		--tqr-muted: #8b949e;
		--tqr-line: #2a3038;
		--tqr-accent: #58a6ff;
	}
}

* {
	box-sizing: border-box;
}

.tqr-body {
	margin: 0;
	background: var(--tqr-bg);
	color: var(--tqr-ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	-webkit-text-size-adjust: 100%;
}

.tqr-shell {
	max-width: 620px;
	margin: 0 auto;
	padding: 28px 18px calc(40px + env(safe-area-inset-bottom));
}

.tqr-header {
	text-align: center;
	margin-bottom: 22px;
}

.tqr-bell {
	width: 54px;
	height: 54px;
	margin: 0 auto 14px;
	border-radius: 16px;
	background: var(--tqr-card);
	border: 1px solid var(--tqr-line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tqr-accent);
}

.tqr-bell svg {
	width: 27px;
	height: 27px;
}

.tqr-title {
	font-size: 26px;
	line-height: 1.2;
	margin: 0 0 4px;
	font-weight: 700;
}

.tqr-address {
	margin: 0;
	color: var(--tqr-muted);
	font-size: 15px;
}

.tqr-lead {
	margin: 16px 0 0;
	color: var(--tqr-muted);
	font-size: 15px;
}

.tqr-search {
	margin-bottom: 14px;
}

.tqr-search input {
	width: 100%;
	padding: 13px 15px;
	font-size: 16px;
	color: var(--tqr-ink);
	background: var(--tqr-card);
	border: 1px solid var(--tqr-line);
	border-radius: 12px;
	outline: none;
}

.tqr-search input:focus {
	border-color: var(--tqr-accent);
}

.tqr-units {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.tqr-unit {
	width: 100%;
	min-height: 76px;
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	background: var(--tqr-card);
	border: 1px solid var(--tqr-line);
	border-radius: 14px;
	color: inherit;
	font: inherit;
	cursor: pointer;
	text-align: center;
	transition: border-color .12s, transform .08s;
}

.tqr-unit:hover:not(:disabled) {
	border-color: var(--tqr-accent);
}

.tqr-unit:active:not(:disabled) {
	transform: scale(.98);
}

.tqr-unit:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.tqr-unit-label {
	font-size: 19px;
	font-weight: 650;
}

.tqr-unit-tenant,
.tqr-unit-nophone {
	font-size: 13px;
	color: var(--tqr-muted);
	line-height: 1.25;
}

.tqr-empty,
.tqr-noresults {
	text-align: center;
	color: var(--tqr-muted);
	padding: 26px 0;
	margin: 0;
}

.tqr-footer {
	margin-top: 30px;
	text-align: center;
	font-size: 13px;
	color: var(--tqr-muted);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.tqr-sheet[hidden] {
	display: none;
}

.tqr-sheet {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.tqr-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, .55);
}

.tqr-sheet-panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: var(--tqr-card);
	border-radius: 20px 20px 0 0;
	padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
	text-align: center;
	animation: tqr-up .18s ease-out;
}

@keyframes tqr-up {
	from { transform: translateY(14px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

@media (min-width: 560px) {
	.tqr-sheet {
		align-items: center;
	}
	.tqr-sheet-panel {
		border-radius: 20px;
	}
}

.tqr-sheet-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	color: var(--tqr-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.tqr-sheet-kicker {
	margin: 0 0 4px;
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tqr-muted);
}

.tqr-sheet-title {
	margin: 0;
	font-size: 27px;
	font-weight: 700;
}

.tqr-sheet-tenant {
	margin: 4px 0 0;
	color: var(--tqr-muted);
	font-size: 15px;
}

.tqr-sheet-tenant:empty {
	display: none;
}

.tqr-sheet-actions {
	display: grid;
	gap: 10px;
	margin: 22px 0 14px;
}

.tqr-action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 16px;
	border: 0;
	border-radius: 14px;
	font-size: 17px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
}

.tqr-action svg {
	width: 21px;
	height: 21px;
	flex: none;
}

.tqr-action-whatsapp {
	background: var(--tqr-wa);
}

.tqr-action-sms {
	background: var(--tqr-sms);
}

.tqr-sheet-note {
	margin: 0;
	font-size: 13px;
	color: var(--tqr-muted);
}

.tqr-sheet-state {
	margin: 22px 0;
	color: var(--tqr-muted);
}
