:root {
	--remote-bg: #f2f6f8;
	--remote-card: #ffffff;
	--remote-ink: #20313f;
	--remote-muted: #61717f;
	--remote-border: #cbd7de;
	--remote-shadow: rgba(30, 52, 72, 0.18);
	--remote-primary: #2a9d8f;
	--remote-primary-ink: #ffffff;
	--remote-accent: #457b9d;
	--remote-warning: #f4a261;
	--remote-error: #d1495b;
	--remote-success: #2d8f52;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	background: linear-gradient(180deg, #dce9ef 0%, var(--remote-bg) 160px);
	color: var(--remote-ink);
	font-family: system-ui, sans-serif;
}

body {
	min-height: 100vh;
}

#remote-app {
	max-width: 1160px;
	margin: 0 auto;
	padding: 18px 14px 28px;
}

.remote-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.remote-header h1 {
	margin: 0;
	font-size: 28px;
}

.remote-subtitle {
	margin-top: 4px;
	font-size: 14px;
	color: var(--remote-muted);
}

.remote-sync {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.sync-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--remote-success);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	box-shadow: 0 8px 20px rgba(45, 143, 82, 0.18);
}

.sync-pill.is-offline {
	background: var(--remote-error);
	box-shadow: 0 8px 20px rgba(209, 73, 91, 0.18);
}

.sync-pill.sync-pill-muted {
	background: #e3ebef;
	color: var(--remote-ink);
	box-shadow: none;
}

.remote-banner {
	margin-bottom: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.remote-banner.is-hidden {
	display: none;
}

.remote-banner.is-success {
	background: rgba(45, 143, 82, 0.12);
	color: #15572e;
}

.remote-banner.is-error {
	background: rgba(209, 73, 91, 0.14);
	color: #7c1f2a;
}

.remote-banner.is-info {
	background: rgba(69, 123, 157, 0.13);
	color: #184a66;
}

.remote-banner.is-warning {
	background: rgba(244, 162, 97, 0.18);
	color: #8f4f0d;
}

.card {
	background: var(--remote-card);
	border: 1px solid var(--remote-border);
	border-radius: 18px;
	box-shadow: 0 18px 34px var(--remote-shadow);
}

.card-header {
	padding: 18px 18px 8px;
}

.card-header h2 {
	margin: 0;
	font-size: 20px;
}

.card-header p {
	margin: 6px 0 0;
	color: var(--remote-muted);
	font-size: 14px;
}

.stack {
	display: grid;
	gap: 12px;
	padding: 18px;
}

.stack label,
.pet-choices {
	display: grid;
	gap: 6px;
}

.stack span,
.pet-choices-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--remote-muted);
}

input,
select,
textarea,
button {
	font: inherit;
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--remote-border);
	border-radius: 12px;
	padding: 11px 12px;
	background: #fbfdfe;
	color: var(--remote-ink);
}

textarea {
	resize: vertical;
	min-height: 104px;
}

button {
	border: 0;
	border-radius: 12px;
	padding: 11px 14px;
	cursor: pointer;
	font-weight: 700;
}

.primary-btn {
	background: var(--remote-primary);
	color: var(--remote-primary-ink);
}

.secondary-btn {
	background: #e7eff3;
	color: var(--remote-ink);
}

.pairing-status {
	padding: 0 18px 18px;
	color: var(--remote-muted);
}

.remote-shell.is-hidden,
.remote-auth.is-hidden {
	display: none;
}

.remote-toolbar {
	margin-bottom: 16px;
	padding: 16px;
}

.toolbar-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
}

.toolbar-meta {
	margin-top: 10px;
	font-size: 13px;
	color: var(--remote-muted);
}

.remote-layout {
	display: grid;
	grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.18fr);
	gap: 16px;
	align-items: start;
}

.remote-list-card,
.remote-editor-card {
	overflow: hidden;
}

.remote-editor-card {
	position: sticky;
	top: 16px;
}

.list-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.list-filter-btn {
	padding: 8px 12px;
	border: 1px solid var(--remote-border);
	border-radius: 999px;
	background: #f2f7f9;
	color: var(--remote-muted);
	font-size: 13px;
	font-weight: 800;
}

.list-filter-btn.is-active {
	background: var(--remote-accent);
	border-color: var(--remote-accent);
	color: #fff;
}

.remote-appointments {
	display: grid;
	gap: 10px;
	padding: 14px 16px 18px;
	max-height: calc(100vh - 290px);
	overflow: auto;
}

.appointment-day {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--remote-muted);
	margin-top: 4px;
}

.appointment-card {
	border: 1px solid var(--remote-border);
	border-left: 5px solid var(--remote-accent);
	border-radius: 14px;
	padding: 12px;
	background: linear-gradient(180deg, #ffffff, #f7fbfd);
	display: grid;
	gap: 6px;
}

.appointment-card.is-selected {
	border-color: var(--remote-primary);
	box-shadow: 0 10px 26px rgba(42, 157, 143, 0.16);
}

.appointment-topline {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-weight: 800;
}

.appointment-time {
	color: var(--remote-ink);
}

.appointment-status {
	font-size: 12px;
	font-weight: 800;
	color: var(--remote-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.appointment-card.is-completed {
	border-left-color: #a3afb7;
	background: linear-gradient(180deg, #fcfdfe, #f2f6f8);
}

.appointment-meta {
	color: var(--remote-muted);
	font-size: 13px;
	display: grid;
	gap: 3px;
}

.appointment-note {
	font-size: 13px;
	background: rgba(69, 123, 157, 0.08);
	padding: 8px 10px;
	border-radius: 10px;
}

.remote-empty {
	padding: 18px;
	color: var(--remote-muted);
	text-align: center;
}

.pet-choices-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pet-choices-grid label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	border: 1px solid var(--remote-border);
	border-radius: 999px;
	background: #f7fbfd;
	font-size: 13px;
}

.pet-choices-grid label.is-selected {
	border-color: var(--remote-primary);
	background: rgba(42, 157, 143, 0.1);
}

.pet-choices-grid input {
	width: auto;
	margin: 0;
	padding: 0;
}

.form-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

@media (max-width: 920px) {
	.remote-layout {
		grid-template-columns: 1fr;
	}

	.remote-editor-card {
		position: static;
	}

	.remote-appointments {
		max-height: none;
		overflow: visible;
	}
}

@media (max-width: 640px) {
	#remote-app {
		padding: 14px 10px 22px;
	}

	.remote-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.toolbar-row {
		grid-template-columns: 1fr;
	}

	.list-filters {
		gap: 6px;
	}

	.list-filter-btn {
		flex: 1 1 calc(33.333% - 4px);
		text-align: center;
	}

	.remote-editor-card,
	.remote-list-card {
		border-radius: 16px;
	}
}
