:root {
	--bg: #050505;
	--glass: rgba(255, 255, 255, .08);
	--border: rgba(255, 255, 255, .12);
	--text: #fff;
	--muted: rgba(255, 255, 255, .65);
	--accent: #e31937
}

* {
	box-sizing: border-box
}

html,
body {
	margin: 0;
	padding: 0;
	background: #000;
	color: var(--text);
	font-family: Inter, Arial, sans-serif;
	overflow: hidden
}

body {
	height: 100vh
}

.wallpaper {
	position: fixed;
	background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .65)), url('../assets/images/model-y-juniper-bg.jpg') center/cover no-repeat;
	inset: 0
}

.overlay {
	position: fixed;
	inset: 0;
	backdrop-filter:
		blur(10px)
}

.shell {
	position: relative;
	z-index: 2;
	height: 100vh;
	padding: 28px
}

.glass {
	background: var(--glass);
	border: 1px solid var(--border);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25)
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 26px
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 16px
}

.dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #4ade80
}

.main {
	display: flex;
	gap: 24px;
	align-items: flex-start
}

.weather {
	width: 360px;
	min-height: 220px;
	border-radius: 20px;
	padding: 18px
}

.weather h3 {
	margin: 0 0 10px;
	font-size: 18px;
	color: var(--muted)
}

.temp {
	font-size: 40px;
	font-weight: 700
}

.apps {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: flex-start
}

.iconBtn {
	width: 94px;
	height: 94px;
	border-radius: 22px;
	border: none;
	color: #fff;
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 12px
}

.iconBtn span {
	display: block;
	text-align: center;
	line-height: 1.15
}

.beta {
	position: absolute;
	top: 6px;
	right: 6px;
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(227, 25, 55, .95)
}

.dock {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	padding: 14px 18px;
	border-radius: 22px;
	display: flex;
	gap: 12px;
	align-items: center;
	z-index: 5
}

.dock a,
.dock button {
	width: 58px;
	height: 58px;
	border-radius: 16px;
	border: none;
	background: rgba(255, 255, 255, .06);
	color: #fff;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .55)
}

.modal.active {
	display: flex
}

.panel {
	width: min(1080px, 92vw);
	height: min(720px, 88vh);
	border-radius: 26px;
	overflow: hidden;
	display: flex;
	flex-direction: column
}

.panelHead {
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.panelTitle {
	font-size: 18px;
	font-weight: 700
}

.panelBody {
	display: grid;
	grid-template-columns: 360px 1fr;
	min-height: 0;
	flex: 1
}

.sidebar {
	border-right: 1px solid rgba(255, 255, 255, .08);
	padding: 18px;
	overflow: auto
}

.playerArea {
	position: relative;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0
}

.field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px
}

.field label {
	font-size: 13px;
	color: var(--muted)
}

.field input,
.field select {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .12);
	background: rgba(255, 255, 255, .05);
	color: #fff;
	outline: none
}

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

.btn {
	border: none;
	border-radius: 12px;
	padding: 12px 16px;
	color: #fff;
	cursor: pointer;
	background: rgba(255, 255, 255, .1)
}

.btn.primary {
	background: var(--accent)
}

.btn.orange {
	background: rgba(251, 146, 60, .85)
}

.status {
	min-height: 24px;
	font-size: 14px;
	color: var(--muted)
}

.screen {
	flex: 1;
	min-height: 0;
	border-radius: 18px;
	overflow: hidden;
	position: relative;
	background: #000;
	border: 1px solid rgba(255, 255, 255, .08);
	display: flex;
	align-items: center;
	justify-content: center
}

.screen video,
.screen iframe {
	width: 100%;
	height: 100%;
	display: block;
	border: none;
	background: #000
}

.processing {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .55);
	z-index: 4;
	font-size: 22px;
	font-weight: 700
}

.processing.active {
	display: flex
}

.log {
	height: 140px;
	overflow: auto;
	border-radius: 14px;
	padding: 12px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .08);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	white-space: pre-wrap
}

.closeBtn {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer
}

.divider {
	font-size: 11px;
	color: var(--muted);
	margin: 10px 0 6px;
	text-transform: uppercase;
	letter-spacing: .06em
}

/* ── YouTube Modal ───────────────────────────────────────── */
#ytModal .panel {
	width: min(1280px, 96vw);
	height: min(820px, 92vh)
}

#ytModal .panelBody {
	padding: 0;
	overflow: hidden;
	display: block !important;
	height: 100%
}

.ytLayout {
	display: grid;
	grid-template-columns: 1fr 360px;
	height: 100%;
	min-height: 0
}

.ytLeft {
	display: flex;
	flex-direction: column;
	border-right: 1px solid rgba(255, 255, 255, .07);
	min-height: 0;
	overflow: hidden
}

.ytSearchBar {
	display: flex;
	gap: 8px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
	flex-shrink: 0
}

.ytSearchInput {
	flex: 1;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 999px;
	color: #fff;
	font-size: 14px;
	padding: 9px 16px;
	outline: none;
	transition: border-color .15s
}

.ytSearchInput:focus {
	border-color: rgba(227, 25, 55, .6)
}

.ytSearchInput::placeholder {
	color: rgba(255, 255, 255, .35)
}

.ytSearchBtn {
	background: #e31937;
	border: none;
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s
}

.ytSearchBtn:hover {
	background: #c41230
}

.ytTabs {
	display: flex;
	gap: 4px;
	padding: 10px 16px 6px;
	flex-shrink: 0
}

.ytTab {
	background: none;
	border: none;
	color: rgba(255, 255, 255, .45);
	font-size: 13px;
	font-weight: 600;
	padding: 7px 14px;
	cursor: pointer;
	border-radius: 999px;
	transition: all .15s
}

.ytTab.active {
	background: rgba(227, 25, 55, .18);
	color: #e31937
}

.ytGrid {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px 16px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	align-content: start;
	grid-auto-rows: max-content
}

.ytGrid::-webkit-scrollbar {
	width: 4px
}

.ytGrid::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, .15);
	border-radius: 2px
}

.ytCard {
	background: rgba(255, 255, 255, .04);
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, .06);
	transition: background .15s, border-color .15s, transform .15s;
	display: flex;
	flex-direction: column
}

.ytCard:hover {
	background: rgba(255, 255, 255, .09);
	border-color: rgba(255, 255, 255, .14);
	transform: translateY(-2px)
}

.ytCard.active {
	border-color: rgba(227, 25, 55, .7);
	background: rgba(227, 25, 55, .1)
}

.ytThumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	background: #111;
	display: block;
	flex-shrink: 0;
	border-radius: 10px 10px 0 0
}

.ytCardInfo {
	padding: 8px 10px 10px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	justify-content: space-between
}

.ytCardTitle {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden
}

.ytCardMeta {
	font-size: 11px;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer
}

.ytCardMeta:hover .ytChannelName {
	color: #fff
}

.ytChannelAvatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0
}

.ytChannelDetails {
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow: hidden
}

.ytChannelName {
	font-size: 12px;
	color: rgba(255, 255, 255, .7);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.ytVideoStats {
	font-size: 11px;
	color: var(--muted);
	overflow: hidden;
	white-space: nowrap
}

.ytVideoStats span {
	display: inline-block;
	animation: ytScroll 8s linear infinite
}

.ytVideoStats span:hover {
	animation-play-state: paused
}

@keyframes ytScroll {
	0% {
		transform: translateX(0)
	}

	30% {
		transform: translateX(0)
	}

	70% {
		transform: translateX(calc(-100% + 100px))
	}

	100% {
		transform: translateX(calc(-100% + 100px))
	}
}

.ytFsOverlay {
	display: flex;
	position: absolute;
	inset: 0;
	z-index: 10;
	flex-direction: column;
	justify-content: flex-end;
	background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, transparent 50%);
	padding: 16px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease
}

.ytFsOverlay.visible {
	opacity: 1;
	pointer-events: auto
}

.ytFsInfo {
	margin-bottom: 8px
}

.ytFsTitle {
	font-size: 15px;
	font-weight: 600;
	color: #fff
}

.ytFsProgressWrap {
	margin-bottom: 10px
}

.ytFsProgressBar {
	height: 4px;
	background: rgba(255, 255, 255, .2);
	border-radius: 2px;
	cursor: pointer;
	position: relative
}

.ytFsProgressFill {
	height: 100%;
	background: linear-gradient(90deg, #e31937, #ff6b6b);
	border-radius: 2px;
	position: relative;
	transition: width .5s linear
}

.ytFsProgressFill::after {
	content: '';
	position: absolute;
	right: -5px;
	top: -4px;
	width: 10px;
	height: 10px;
	background: #fff;
	border-radius: 50%
}

.ytFsTimeLabel {
	font-size: 11px;
	color: rgba(255, 255, 255, .6);
	margin-top: 4px
}

.ytFsControls {
	display: flex;
	align-items: center;
	gap: 8px
}

.ytEmpty {
	grid-column: 1/-1;
	text-align: center;
	color: var(--muted);
	font-size: 14px;
	padding: 40px 0
}

.ytSpinnerWrap {
	grid-column: 1/-1;
	display: flex;
	justify-content: center;
	padding: 40px 0
}

.ytSpinnerWrap .tvSpinner {
	width: 32px;
	height: 32px
}

.ytPauseShadeOverlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.10);
	backdrop-filter: blur(1.5px);
	-webkit-backdrop-filter: blur(1.5px);
	pointer-events: none;
	z-index: 4;
	opacity: 0;
	transition: opacity .2s ease
}

.ytCenterPlayOverlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 5;
	opacity: 0;
	transition: opacity .2s ease
}

.ytCenterPlayOverlayInner {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.22);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12)
}

.ytCenterPlayOverlay svg {
	margin-left: 6px;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45))
}

/* YouTube right panel — player */
.ytRight {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: rgba(0, 0, 0, .3)
}

.ytPlayer {
	aspect-ratio: 16/9;
	background: #000;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden
}

.ytPlayerPlaceholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: rgba(255, 255, 255, .3)
}

.ytPlayerPlaceholder svg {
	opacity: .4
}

/* Progress bar for YouTube player */
.ytProgressWrap {
	padding: 8px 14px 0;
	flex-shrink: 0
}

.ytProgressBar {
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .15);
	cursor: pointer;
	position: relative
}

.ytProgressFill {
	height: 100%;
	border-radius: 2px;
	width: 0%;
	background: linear-gradient(90deg, #e31937, rgba(255, 255, 255, .5));
	pointer-events: none;
	transition: width .5s linear;
	position: relative
}

.ytProgressFill::after {
	content: '';
	position: absolute;
	right: -5px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 4px rgba(0, 0, 0, .5)
}

.ytTimeLabel {
	font-size: 11px;
	color: var(--muted);
	margin-top: 5px;
	text-align: right;
	padding: 0 14px
}

.ytPlayerInfo {
	flex: 1;
	padding: 10px 16px;
	overflow-y: auto;
	min-height: 0
}

.ytPlayerTitle {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	margin-bottom: 4px
}

.ytPlayerMeta {
	font-size: 11px;
	color: var(--muted)
}

.ytPlayerControls {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 14px;
	border-top: 1px solid rgba(255, 255, 255, .07);
	flex-shrink: 0
}

/* Quality picker for YouTube */
#ytQualityWrap {
	position: relative
}

#ytQualityMenu {
	display: none;
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
	background: rgba(20, 20, 20, .95);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 12px;
	overflow: hidden;
	min-width: 110px;
	z-index: 20
}

#ytFavBtn, #ytFsFavBtn {
	min-width: 40px;
	justify-content: center;
}

/* TV Player */
#tvModal .panel {
	width: min(1200px, 94vw);
	height: min(740px, 90vh)
}

#tvModal .panelBody {
	grid-template-columns: 260px 1fr
}

.channelList {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px
}

.channelItem {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background .15s, border-color .15s
}

.channelItem:hover {
	background: rgba(255, 255, 255, .08)
}

.channelItem.active {
	background: rgba(227, 25, 55, .18);
	border-color: rgba(227, 25, 55, .5)
}

.channelLogo {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	object-fit: contain;
	background: rgba(255, 255, 255, .06);
	padding: 3px;
	flex-shrink: 0
}

.channelInfo {
	display: flex;
	flex-direction: column;
	min-width: 0
}

.channelName {
	font-size: 14px;
	font-weight: 600
}

.channelMeta {
	font-size: 11px;
	color: var(--muted);
	margin-top: 2px
}

.tvScreen {
	flex: 1;
	min-height: 0;
	border-radius: 18px;
	overflow: hidden;
	position: relative;
	background: #000;
	border: 1px solid rgba(255, 255, 255, .08);
	display: flex;
	align-items: center;
	justify-content: center
}

.tvChannelName {
	position: absolute;
	bottom: 56px;
	left: 14px;
	z-index: 5;
	background: rgba(0, 0, 0, .6);
	backdrop-filter: blur(8px);
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	pointer-events: none;
	opacity: 0;
	transition: opacity .3s
}

.tvChannelName.show {
	opacity: 1
}

/* ── TV Controls ─────────────────────────────────────────── */
.tvControls {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	padding: 0 16px 14px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .85));
	opacity: 0;
	transition: opacity .25s;
	border-radius: 0 0 18px 18px
}

.tvScreen:hover .tvControls {
	opacity: 1
}

/* Progress bar */
.tvProgress {
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .25);
	margin-bottom: 12px;
	position: relative;
	cursor: pointer
}

.tvProgressFill {
	height: 100%;
	border-radius: 2px;
	background: linear-gradient(90deg, #e31937, rgba(255, 255, 255, .6));
	width: 0%;
	transition: width .5s linear;
	position: relative
}

.tvProgressFill::after {
	content: '';
	position: absolute;
	right: -5px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 4px rgba(0, 0, 0, .5)
}

/* Bottom row */
.tvControlsRow {
	display: flex;
	align-items: center;
	gap: 8px
}

/* Pill buttons */
.tvPill {
	background: rgba(30, 30, 30, .85);
	border: none;
	color: #fff;
	height: 34px;
	padding: 0 14px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: background .15s;
	flex-shrink: 0;
	white-space: nowrap
}

.tvPill:hover {
	background: rgba(60, 60, 60, .95)
}

/* Big red play/pause button */
.tvPlayPill {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #e31937;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s;
	box-shadow: 0 2px 12px rgba(227, 25, 55, .5)
}

.tvPlayPill:hover {
	background: #c41230
}

.tvPlayPill.loading {
	animation: tvSpin .8s linear infinite
}

@keyframes tvSpin {
	from {
		transform: rotate(0deg)
	}

	to {
		transform: rotate(360deg)
	}
}

/* Center play overlay */
.tvPlayOverlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	border: 2px solid rgba(255, 255, 255, .8);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: #fff;
	pointer-events: none;
	z-index: 6;
	opacity: 0;
	transition: opacity .2s
}

.tvScreen.paused .tvPlayOverlay {
	opacity: 1
}

/* Loading overlay */
.tvLoadingOverlay {
	position: absolute;
	inset: 0;
	z-index: 7;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	pointer-events: none;
}

.tvLoadingOverlay.active {
	display: flex;
}

.tvSpinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, .15);
	border-top-color: #e31937;
	border-radius: 50%;
	animation: tvSpin .7s linear infinite;
}

.tvLoadingText {
	font-size: 14px;
	color: #fff;
	font-weight: 500;
}

.tvSpacer {
	flex: 1;
}

.qOption {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	transition: background .12s;
	white-space: nowrap;
}

.qOption:hover {
	background: rgba(255, 255, 255, .1);
}

.qOption.active {
	color: #e31937;
}

.qOption+.qOption {
	border-top: 1px solid rgba(255, 255, 255, .07);
}

.teslaWidget {
	width: 360px;
	border-radius: 20px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.teslaHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.teslaTitle {
	display: flex;
	align-items: center;
	gap: 10px;
}

.teslaTitle h3 {
	margin: 0;
	font-size: 18px;
	color: var(--muted);
}

.teslaBadge {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .08);
	color: var(--muted);
}

.teslaBadge.online {
	background: rgba(74, 222, 128, .15);
	color: #4ade80;
}

.teslaBadge.sleeping {
	background: rgba(255, 255, 255, .06);
	color: rgba(255, 255, 255, .4);
}

.teslaConnectBtn {
	padding: 6px 14px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 8px;
	color: #fff;
	font-size: 12px;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s;
}

.teslaConnectBtn:hover {
	background: rgba(255, 255, 255, .14);
}

.teslaConnectBtn.connected {
	color: #4ade80;
	border-color: rgba(74, 222, 128, .3);
}

/* Stats bar */
.teslaStats {
	display: flex;
	gap: 10px;
}

.teslaStat {
	flex: 1;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .07);
	border-radius: 12px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.teslaStatLabel {
	font-size: 10px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .05em;
}

.teslaStatValue {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.teslaStatUnit {
	font-size: 10px;
	color: var(--muted);
}

/* Battery bar */
.teslaBattery {
	height: 6px;
	background: rgba(255, 255, 255, .08);
	border-radius: 3px;
	overflow: hidden;
}

.teslaBatteryFill {
	height: 100%;
	border-radius: 3px;
	background: linear-gradient(90deg, #4ade80, #22d3ee);
	transition: width .4s ease;
}

.teslaBatteryFill.low {
	background: linear-gradient(90deg, #f87171, #fb923c);
}

/* Quick action buttons */
.teslaActions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.teslaBtn {
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 14px;
	color: #fff;
	cursor: pointer;
	padding: 12px 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-family: inherit;
	transition: background .15s, border-color .15s, transform .1s;
	position: relative;
	overflow: hidden;
}

.teslaBtn:hover {
	background: rgba(255, 255, 255, .10);
	border-color: rgba(255, 255, 255, .16);
	transform: translateY(-1px);
}

.teslaBtn:active {
	transform: scale(.96);
}

.teslaBtn.loading {
	opacity: .6;
	pointer-events: none;
}

.teslaBtn.success {
	border-color: rgba(74, 222, 128, .5);
	background: rgba(74, 222, 128, .08);
}

.teslaBtn.error {
	border-color: rgba(248, 113, 113, .5);
	background: rgba(248, 113, 113, .08);
}

.teslaBtnIcon {
	font-size: 20px;
}

.teslaBtnLabel {
	font-size: 11px;
	color: rgba(255, 255, 255, .75);
	text-align: center;
	line-height: 1.2;
}

/* Not connected state */
.teslaNotConnected {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 18px 0 8px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}