/* Phone + native-app extras for OnePlus / Android master admin. */
html.lc-phone, html.lc-native-app, html.lc-standalone {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
html.lc-native-app body,
html.lc-standalone body {
	overscroll-behavior-y: none;
	user-select: none;
}
html.lc-native-app input,
html.lc-native-app textarea,
html.lc-standalone input,
html.lc-standalone textarea,
html.lc-native-app .login-panel,
html.lc-standalone .login-panel {
	user-select: text;
}
html.lc-native-app .login-wrap,
html.lc-standalone .login-wrap {
	min-height: 100dvh;
}

@media (max-width: 900px) {
	html.lc-phone .btn,
	html.lc-phone .btn-soft,
	html.lc-phone .btn-ghost,
	html.lc-phone .btn-danger,
	html.lc-phone .btn-green,
	html.lc-phone .btn-google {
		min-height: 44px;
	}
	html.lc-phone .dock-btn {
		min-height: 56px;
	}
	html.lc-native-app .shell,
	html.lc-standalone .shell {
		padding-top: calc(56px + env(safe-area-inset-top, 0px));
		padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 430px) {
	.login-panel h1 { font-size: 24px; }
	.login-panel { padding: 28px 18px; }
	.dock-btn span:last-child { font-size: 10px; }
}

.ledger-table .ledger-freight {
	width: 96px;
	max-width: 100%;
	text-align: right;
}
.ledger-table tfoot td,
.ledger-table tfoot th {
	font-weight: 700;
}

.topbar { flex-wrap: wrap; }
.topbar .actions {
	flex: 1 1 280px;
	min-width: 0;
	justify-content: flex-end;
}
.ops-page .ops-nav { row-gap: 8px; }
.ops-table { min-width: 1080px; }
.ops-slot {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: flex-end;
	padding: 14px 16px;
	margin: 12px 0 0;
	background: #f4f7fb;
	border: 1px solid #d7e2f0;
	border-radius: 12px;
}
.ops-slot-copy { flex: 1 1 220px; min-width: 0; }
.ops-slot label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #1d3b66;
}
.ops-slot select {
	min-width: 168px;
	min-height: 40px;
	padding: 6px 10px;
	border: 1px solid #c5d4e8;
	border-radius: 8px;
	background: #fff;
	font: inherit;
}
.ops-search { max-width: 320px; }
.ops-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}
.ops-actions .btn-sm { white-space: nowrap; }

@media (max-width: 900px) {
	.ops-table { min-width: 0; }
	.topbar .actions > * { flex: 1 1 calc(50% - 8px); }
}

html.lc-native-app .offline-banner,
html.lc-standalone .offline-banner {
	position: sticky;
	top: calc(56px + env(safe-area-inset-top, 0px));
	z-index: 50;
	background: #fff7e6;
	color: #7a5410;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	border-bottom: 1px solid #f0d59a;
}

.live-msg.is-mira { border-left: 3px solid #075e54; padding-left: 8px; }
.live-msg.is-sys { opacity: .78; }
.wa-inbox {
	display: grid;
	grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
	min-height: min(72vh, 720px);
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
}
.wa-list {
	border-right: 1px solid var(--line);
	background: #fff;
	overflow: auto;
	display: flex;
	flex-direction: column;
}
.wa-list-tools {
	display: grid;
	gap: 8px;
	padding: 10px;
	border-bottom: 1px solid var(--line);
	background: #f0f2f5;
}
.wa-row {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
	border-bottom: 1px solid #f0f2f5;
}
.wa-row:hover, .wa-row.is-on { background: #f0f2f5; }
.wa-row.is-unread b { font-weight: 800; }
.wa-av {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #dfe5e7;
	color: #075e54;
	font-weight: 800;
	flex-shrink: 0;
}
.wa-row-copy { min-width: 0; display: grid; gap: 2px; }
.wa-row-copy b, .wa-row-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-row-copy small { color: var(--muted); font-size: 12px; }
.wa-row-meta { display: grid; justify-items: end; gap: 4px; }
.wa-row-meta em {
	min-width: 18px;
	height: 18px;
	padding: 0 6px;
	border-radius: 9px;
	background: #25d366;
	color: #fff;
	font-style: normal;
	font-size: 11px;
	font-weight: 800;
	display: grid;
	place-items: center;
}
.wa-row-meta time { font-size: 11px; color: var(--muted); }
.wa-pane { display: flex; flex-direction: column; min-width: 0; background: #e5ddd5; }
.wa-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: #075e54;
	color: #fff;
}
.wa-head b { display: block; font-size: 15px; }
.wa-head small { display: block; font-size: 11px; opacity: .85; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-head .wa-av { background: #128c7e; color: #fff; }
.wa-head-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wa-head-acts .btn, .wa-head-acts .btn-soft, .wa-head-acts .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.wa-log {
	flex: 1;
	overflow: auto;
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background-image: radial-gradient(rgba(7,94,84,.06) 1px, transparent 1px);
	background-size: 18px 18px;
}
.wa-bub {
	max-width: 78%;
	background: #fff;
	border-radius: 8px;
	padding: 7px 9px 4px;
	box-shadow: 0 1px 0 rgba(0,0,0,.06);
	align-self: flex-start;
}
.wa-bub.is-mine { align-self: flex-end; background: #dcf8c6; }
.wa-bub.is-looking p { color: #0f766e; font-weight: 600; }
.wa-bub.is-looking a { color: inherit; }
.wa-looking {
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #0f766e;
	line-height: 1.35;
}
.wa-looking a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.wa-bub p { margin: 0; font-size: 14px; line-height: 1.4; }
.wa-photo { display: block; margin: 2px 0 6px; border-radius: 8px; overflow: hidden; }
.wa-photo img { display: block; max-width: 240px; max-height: 280px; width: auto; height: auto; object-fit: cover; }
.wa-who { display: block; font-size: 11px; font-weight: 700; color: #075e54; margin-bottom: 2px; }
.wa-time { display: block; text-align: right; font-size: 10px; color: #667781; margin-top: 2px; }
.wa-compose {
	background: #f0f2f5;
	padding: 8px;
	display: grid;
	gap: 6px;
}
.wa-compose-row { display: flex; gap: 8px; align-items: center; }
.wa-compose-row .input { max-width: 140px; }
.wa-empty, .wa-empty-pane { padding: 24px 16px; }
.wa-empty-pane { margin: auto; text-align: center; }
@media (max-width: 900px) {
	.wa-inbox { grid-template-columns: 1fr; min-height: 0; }
	.wa-list { max-height: 38vh; }
	.wa-pane { min-height: 52vh; }
	.wa-head { flex-wrap: wrap; }
	.wa-head-acts { width: 100%; margin-left: 0; }
}
