:root{color-scheme:light;--ink:#17181a;--muted:#646a6f;--glass:rgba(250,250,251,.56);--line:rgba(255,255,255,.72);--shadow:0 18px 44px rgba(56,59,62,.18),inset 0 1px 0 rgba(255,255,255,.88);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif}*{box-sizing:border-box}html{height:100%;scroll-behavior:smooth}body{margin:0;min-height:100%;overflow:hidden;color:var(--ink);background:#abb0b3}button,input{font:inherit}[hidden]{display:none!important}.scene{position:fixed;inset:-34px;z-index:-2;background:url('/carplay-reference.png?v=carplay-ios17-wallpaper-20261019') center 58%/cover no-repeat;filter:blur(24px) saturate(.12);transform:scale(1.08)}body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(115deg,rgba(237,238,238,.42),rgba(250,250,250,.2) 48%,rgba(255,221,213,.34)),radial-gradient(circle at 53% 8%,rgba(255,255,255,.28),transparent 36%)}.glass{background:var(--glass);border:1px solid var(--line);box-shadow:var(--shadow);backdrop-filter:blur(24px) saturate(1.45);-webkit-backdrop-filter:blur(24px) saturate(1.45)}.glass-solid{background:rgba(251,251,251,.82);border:1px solid rgba(255,255,255,.85);box-shadow:0 10px 25px rgba(59,63,66,.17);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.dashboard{height:100vh;height:100dvh;min-height:640px;padding:12px 20px 10px;display:flex;flex-direction:column;gap:10px}.topbar{height:54px;flex:none;border-radius:23px;padding:0 12px 0 16px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;background:rgba(90,94,100,.4);border-color:rgba(255,255,255,.31);color:#fff;box-shadow:0 12px 36px rgba(58,61,64,.15),inset 0 1px rgba(255,255,255,.33)}.brand{display:flex;align-items:center;gap:11px}.apple-mark{font-size:24px}.brand strong{display:block;font-size:15px;letter-spacing:-.25px}.brand small{display:block;font-size:9px;color:rgba(255,255,255,.68)}.top-center{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:650}.mode-dot{width:8px;height:8px;border-radius:50%;background:#ffd75d;box-shadow:0 0 0 4px rgba(255,215,93,.15)}.top-actions{justify-self:end;display:flex;align-items:center;gap:9px}.vehicle-chip{height:34px;padding:0 11px;border-radius:17px;display:flex;align-items:center;gap:6px;background:rgba(31,33,35,.4);border:1px solid rgba(255,255,255,.18);font-size:10px}.vehicle-chip small{color:rgba(255,255,255,.62);padding-left:6px;border-left:1px solid rgba(255,255,255,.25)}.mini-car{font-size:9px}.clock{font-weight:650;font-size:11px;padding:0 4px}.round-button{width:36px;height:36px;border:1px solid rgba(255,255,255,.38);border-radius:50%;background:rgba(255,255,255,.18);color:#fff;font-size:21px;cursor:pointer}.round-button:active,.dock-item:active,.service-card:active,.player-controls button:active,.primary-button:active{transform:scale(.97)}
.workspace{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(500px,.92fr);gap:10px}.left-stack,.right-stack{min-height:0;display:flex;flex-direction:column;gap:10px}.music-card{flex:1;min-height:295px;border-radius:29px;padding:16px 19px 14px;overflow:hidden;position:relative}.music-card::after{content:"";position:absolute;width:48%;height:90%;right:-8%;bottom:-30%;border-radius:50%;background:radial-gradient(circle,rgba(255,128,173,.25),rgba(158,164,168,.08) 55%,transparent 70%);filter:blur(8px)}.card-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative;z-index:1}.section-title{display:flex;align-items:center;gap:11px}.section-title h2{font-size:18px;letter-spacing:-.4px;margin:2px 0 0}.eyebrow{display:block;color:#5b6065;font-size:8px;letter-spacing:1.35px;font-weight:800}.service-state{display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:102px}.service-state small,.car-status small{color:#6a7075;font-size:8px;white-space:nowrap}.state-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:99px;background:rgba(255,255,255,.59);box-shadow:inset 0 1px rgba(255,255,255,.9);padding:6px 9px;color:#61676c;font-size:9px;font-weight:700;white-space:nowrap}.now-playing{height:calc(100% - 48px);position:relative;z-index:1;display:grid;grid-template-columns:145px minmax(0,1fr) auto;gap:18px;align-items:center;padding:4px 5px}.album-art{width:136px;height:136px;border-radius:24px;position:relative;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#ffb8c9,#bebdc3 44%,#9ea4a8 72%,#68d5c3);box-shadow:0 16px 30px rgba(87,90,97,.22),inset 0 1px rgba(255,255,255,.8)}.album-art::before{content:"";position:absolute;inset:-20%;background:radial-gradient(circle at 70% 13%,rgba(255,255,255,.88),transparent 19%),linear-gradient(34deg,rgba(255,223,139,.6),transparent 48%),linear-gradient(155deg,transparent 35%,rgba(255,255,255,.26));transform:rotate(-9deg)}.album-art span{position:relative;z-index:2;color:#fff;font-size:46px;text-shadow:0 7px 18px rgba(73,73,81,.25)}.album-art i{position:absolute;width:72%;height:72%;border:1px solid rgba(255,255,255,.5);border-radius:50%;box-shadow:inset 0 0 0 18px transparent}.track-info{min-width:0}.source-label{margin:0 0 6px;color:#6a7076;font-size:10px}.track-info h1{margin:0 0 7px;font-size:clamp(22px,2.2vw,32px);line-height:1.03;letter-spacing:-1px}.track-detail{max-width:460px;margin:0;color:#64696e;font-size:10px;line-height:1.45}.progress-wrap{margin-top:15px;display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;color:#6c7277;font-size:8px}.progress{height:4px;border-radius:10px;background:rgba(75,79,83,.17)}.player-controls{display:flex;flex-direction:column;gap:8px}.player-controls button{width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.4);color:#34373a;font-size:17px;cursor:pointer}.player-controls .play-control{width:48px;height:48px;background:rgba(255,255,255,.86);box-shadow:0 7px 17px rgba(70,74,78,.15);font-size:15px}
.services-row{height:168px;flex:none;display:grid;grid-template-columns:1.45fr 1.45fr .72fr .72fr;gap:9px}.service-card{min-width:0;border-radius:24px;padding:13px;border:0;text-align:left;color:var(--ink);cursor:pointer}.wide-service{display:grid;grid-template-columns:47px minmax(0,1fr);grid-template-rows:1fr auto;column-gap:10px;align-items:center}.service-copy{min-width:0;display:flex;flex-direction:column}.service-copy>small{color:#61666b;font-size:7px;font-weight:800;letter-spacing:1.05px}.service-copy strong{font-size:14px;margin:2px 0 5px}.service-copy>span{color:#6a7075;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.service-meta{grid-column:1/-1;border-top:1px solid rgba(255,255,255,.65);padding-top:7px;display:flex;align-items:center;justify-content:space-between;gap:6px}.service-meta b{font-size:8px;color:#676d72}.service-meta small{font-size:7px;color:#71777c}.compact-service{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px}.compact-service strong{font-size:11px}.compact-service small{font-size:7px;color:#6a7075}
.right-stack{position:relative}.map-card{flex:1;min-height:390px;border-radius:30px;position:relative;overflow:hidden;background:rgba(236,237,238,.45)}.map-frame{position:absolute;inset:0}.map-frame iframe{display:block;width:100%;height:100%;border:0}.map-header{position:absolute;left:13px;right:13px;top:13px;z-index:2;border-radius:19px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px}.map-header .section-title h2{font-size:16px}.map-state{color:#e31837;background:rgba(238,239,240,.78)}.map-search{position:absolute;left:13px;right:13px;bottom:28px;z-index:2;border-radius:18px;padding:7px;display:flex;gap:7px}.map-search input,.login-card input{min-width:0;flex:1;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.5);padding:0 12px;outline:none;color:#252728;font-size:11px}.map-search input:focus,.login-card input:focus{box-shadow:0 0 0 3px rgba(227,24,55,.18)}.primary-button{height:40px;border:0;border-radius:12px;padding:0 14px;background:linear-gradient(145deg,#e31837,#e31837);box-shadow:0 6px 14px rgba(227,24,55,.23);color:#fff;font-size:10px;font-weight:750;cursor:pointer}.map-note{position:absolute;z-index:2;bottom:8px;left:15px;right:15px;text-align:center;margin:0;color:#53585c;font-size:7px;text-shadow:0 1px rgba(255,255,255,.8)}.car-strip{height:120px;flex:none;border-radius:26px;padding:12px 15px;display:grid;grid-template-columns:155px minmax(175px,1fr) 86px;align-items:center;overflow:hidden}.car-copy h2{font-size:15px;line-height:1.04;letter-spacing:-.35px;margin:4px 0 7px}.car-status{display:flex;align-items:flex-start;flex-direction:column;gap:2px}.car-visual{height:100px;position:relative;display:grid;place-items:center}.car-visual i{position:absolute;width:75%;height:30%;bottom:8px;background:rgba(255,255,255,.75);filter:blur(14px);border-radius:50%}.car-visual svg{position:relative;width:100%;filter:drop-shadow(0 10px 9px rgba(62,66,69,.18))}.car-metrics{border-left:1px solid rgba(255,255,255,.7);padding-left:12px;display:grid;gap:11px}.car-metrics div{display:flex;flex-direction:column;gap:2px}.car-metrics span{font-size:7px;color:#6a7075}.car-metrics strong{font-size:14px;color:#484c4f}
.footer-bar{height:86px;flex:none;position:relative;display:flex;align-items:center;justify-content:center}.dock{height:82px;border-radius:29px;padding:7px 10px;display:flex;align-items:center;gap:5px;background:rgba(250,250,251,.54)}.dock-item{width:76px;min-width:0;height:66px;border:0;border-radius:18px;background:transparent;color:#26292b;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:8px;cursor:pointer}.dock-item.active,.dock-item:hover{background:rgba(255,255,255,.55)}.privacy-note{position:absolute;right:2px;bottom:1px;font-size:7px;color:rgba(43,45,47,.76)}
.sprite-icon{position:relative;display:block;flex:none;width:45px;height:45px;border-radius:13px;overflow:hidden;box-shadow:0 5px 12px rgba(58,61,64,.17)}.sprite-icon img{position:absolute;width:836px;height:470.5px;max-width:none}.sprite-map img{position:static;left:auto;top:auto;width:100%;height:100%}.sprite-music img{left:-250px;top:-399px}.sprite-calendar img{left:-342px;top:-399px}.sprite-reminders img{left:-433px;top:-399px}.sprite-mail img{left:-523px;top:-399px}.sprite-apps img{left:-631px;top:-399px}.whatsapp-logo{display:block;flex:none;width:45px;height:45px;border-radius:13px;overflow:hidden;background:linear-gradient(145deg,#63e58e,#1fb75a);box-shadow:0 5px 12px rgba(31,91,54,.19),inset 0 1px rgba(255,255,255,.4)}.whatsapp-logo svg{display:block;width:100%;height:100%;padding:4px}
.toast{position:fixed;z-index:20;left:50%;bottom:101px;transform:translate(-50%,8px);opacity:0;pointer-events:none;border-radius:14px;padding:10px 15px;background:rgba(34,36,38,.92);box-shadow:0 12px 25px rgba(36,38,39,.24);color:#fff;font-size:10px;transition:opacity .18s,transform .18s}.toast.visible{opacity:1;transform:translate(-50%,0)}.apps-panel{position:absolute;z-index:10;right:20px;bottom:92px;min-width:240px;border-radius:22px;padding:8px}.apps-panel button{display:flex;justify-content:space-between;width:100%;padding:11px;border:0;border-radius:12px;background:transparent;color:#262829;text-align:left;cursor:pointer}.apps-panel button:hover{background:rgba(255,255,255,.5)}.apps-panel small{color:#6d7378}.login-screen{height:100vh;height:100dvh;display:grid;place-items:center;padding:24px}.login-card{width:min(420px,100%);border-radius:29px;padding:31px}.login-mark{width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#9fa6a9,#a8a7b0);color:#fff;font-size:28px;box-shadow:0 11px 24px rgba(94,97,103,.2);margin-bottom:17px}.login-card h1{font-size:33px;line-height:1.04;letter-spacing:-1px;margin:10px 0}.login-card>p:not(.eyebrow):not(.error){color:#646a6f;font-size:11px;line-height:1.5}.login-card label{display:block;margin:17px 0 7px;color:#646a6f;font-size:9px}.login-card input{width:100%;height:43px;border:1px solid rgba(255,255,255,.9);background:rgba(255,255,255,.55)}.login-card .primary-button{width:100%;margin-top:10px;height:43px}.error{min-height:17px;color:#a14741;font-size:10px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1080px){body{overflow:auto}.dashboard{height:auto;min-height:100vh;min-height:100dvh}.workspace{grid-template-columns:1fr}.music-card{min-height:330px}.services-row{height:auto;min-height:155px}.right-stack{min-height:590px}.map-card{min-height:450px}.footer-bar{height:90px}.dock{max-width:100%;gap:2px;padding-inline:6px}.dock-item{width:auto;flex:1}.privacy-note{display:none}}
@media(max-width:720px){.dashboard{padding:8px;gap:8px}.topbar{grid-template-columns:1fr auto}.top-center{display:none}.vehicle-chip{display:none}.workspace,.left-stack,.right-stack{gap:8px}.music-card{padding:14px;min-height:380px}.now-playing{grid-template-columns:110px 1fr;grid-template-rows:1fr auto;gap:11px}.album-art{width:105px;height:105px;border-radius:20px}.track-info h1{font-size:21px}.player-controls{grid-column:1/-1;flex-direction:row;justify-content:center}.services-row{grid-template-columns:1fr 1fr}.wide-service{min-height:125px}.compact-service{min-height:105px}.right-stack{min-height:560px}.map-card{min-height:420px}.car-strip{grid-template-columns:140px 1fr;height:130px}.car-metrics{display:none}.dock{width:100%;padding-inline:5px}.dock-item{min-width:0;flex:1;font-size:7px}.sprite-icon,.whatsapp-logo{width:39px;height:39px}.sprite-icon img{transform:scale(.866);transform-origin:top left}}
@media(max-height:760px) and (min-width:1081px){.dashboard{padding-top:8px;padding-bottom:7px;gap:7px}.topbar{height:49px}.workspace,.left-stack,.right-stack{gap:7px}.music-card{min-height:270px;padding-top:13px}.now-playing{grid-template-columns:125px minmax(0,1fr) auto}.album-art{width:116px;height:116px}.track-info h1{font-size:27px}.services-row{height:140px}.service-card{padding:10px}.car-strip{height:105px}.car-visual{height:88px}.footer-bar{height:73px}.dock{height:70px}.dock-item{height:58px}.sprite-icon,.whatsapp-logo{width:39px;height:39px}.sprite-icon img{transform:scale(.866);transform-origin:top left}.privacy-note{display:none}}
.map-search{bottom:7px}.map-note{display:none}
.workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.left-stack,.right-stack{gap:10px}
.left-stack .map-card{flex:1;min-height:330px}
.left-stack .music-card{height:154px;min-height:154px;flex:none;padding:14px 17px;display:grid;grid-template-columns:102px minmax(0,1fr) auto;align-items:center;gap:16px}
.left-stack .music-card::after{width:55%;height:160%;right:-8%;bottom:-75%}
.music-brand{display:none}
.compact-art{width:92px;height:92px;border-radius:19px}
.compact-art span{font-size:34px}
.left-stack .track-info h1{font-size:22px;margin:4px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.music-title-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.left-stack .source-label{font-size:9px;margin:0}
.left-stack .progress-wrap{margin-top:11px}
.left-stack .player-controls{flex-direction:row;gap:8px}
.left-stack .player-controls button{width:39px;height:39px}
.left-stack .player-controls .play-control{width:49px;height:49px}
.map-frame{inset:-54px 0 0;height:calc(100% + 54px)}
.map-frame iframe{height:100%}
.map-search{bottom:9px}
.map-search input{height:42px}
.secondary-button{height:40px;border:0;border-radius:12px;padding:0 12px;background:rgba(255,255,255,.64);color:#3e4144;font-size:9px;font-weight:750;cursor:pointer;box-shadow:inset 0 1px rgba(255,255,255,.9)}
.map-note{display:block;bottom:64px;left:20px;right:20px;padding:5px 9px;border-radius:10px;background:rgba(251,251,252,.66);backdrop-filter:blur(12px);font-size:7px;color:#4e5356}
.personal-grid{height:48%;min-height:220px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.info-card{min-width:0;border-radius:28px;padding:16px;overflow:hidden}
.info-card .section-title h2{font-size:16px}
.info-card .section-title{gap:9px}
.info-card .service-state{min-width:88px}
.calendar-heading-actions{display:flex;align-items:center;gap:5px}.calendar-refresh{width:25px;height:25px;flex:none;border:1px solid rgba(255,255,255,.7);border-radius:50%;background:rgba(255,255,255,.56);color:#565a5e;font-size:17px;line-height:1;cursor:pointer}.calendar-refresh:disabled{opacity:.5;cursor:default}
.empty-panel{margin-top:18px;min-height:92px;border-radius:19px;padding:14px;display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.36);border:1px solid rgba(255,255,255,.48)}
.empty-panel strong{display:block;font-size:11px;margin-bottom:4px}
.empty-panel small{display:block;color:#6a7076;font-size:8px;line-height:1.35}
.empty-accent{width:5px;height:48px;border-radius:99px;background:linear-gradient(#ff634a,#a76fea)}
.empty-check{width:24px;height:24px;border-radius:50%;border:2px solid rgba(227,24,55,.45);flex:none}
.right-stack .car-card{flex:1;min-height:250px;border-radius:30px;padding:17px 20px 14px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;overflow:hidden}
.car-heading{grid-column:1/-1;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.car-heading h2{font-size:20px;margin:4px 0 0;letter-spacing:-.55px}
.car-heading .car-status{align-items:flex-end}
.right-stack .car-visual{grid-column:1/-1;height:auto;min-height:130px}
.right-stack .car-visual svg{width:min(82%,430px)}
.right-stack .car-visual i{width:58%;height:30%;bottom:16px}
.right-stack .car-metrics{grid-column:1/-1;grid-template-columns:repeat(3,1fr);border-left:0;border-top:1px solid rgba(255,255,255,.68);padding:10px 0 0;gap:0}
.right-stack .car-metrics div+div{border-left:1px solid rgba(255,255,255,.65);padding-left:14px}
.right-stack .car-metrics span{font-size:8px}.right-stack .car-metrics strong{font-size:15px}
.sprite-icon img{transform:none!important}
@media(max-width:1080px){.workspace{grid-template-columns:1fr}.left-stack .map-card{min-height:430px}.left-stack .music-card{height:165px}.personal-grid{height:auto;min-height:230px}.right-stack .car-card{min-height:310px}.right-stack{min-height:auto}}
@media(max-width:720px){.left-stack .music-card{height:auto;min-height:250px;grid-template-columns:90px 1fr;grid-template-rows:auto auto}.compact-art{width:82px;height:82px}.left-stack .player-controls{grid-column:1/-1}.personal-grid{grid-template-columns:1fr}.info-card{min-height:165px}.map-search{left:8px;right:8px;gap:4px}.map-search input{width:42%}.secondary-button,.primary-button{padding:0 8px;font-size:8px}.map-note{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Quadro de foco: resumo do projeto dentro de uma caixa própria do Launchpad. */
.project-board-card{position:relative;overflow:auto;container-type:inline-size;container-name:project-board;padding:clamp(16px,2.4vw,30px);border-radius:28px;background:linear-gradient(145deg,rgba(250,250,251,.91),rgba(232,235,238,.76));color:#25282b;scrollbar-width:thin}
.project-board-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 17px}
.project-board-header h2{margin:5px 0;font-size:clamp(19px,2vw,27px);letter-spacing:-.8px}
.project-board-header p{margin:0;color:#697077;font-size:12px}
.project-board-signal{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:8px 11px;border:1px solid #ffffffb0;border-radius:99px;background:#ffffff80;color:#626970;font-size:10px;font-weight:700}
.project-board-signal i{width:7px;height:7px;border-radius:50%;background:#f0a12e;box-shadow:0 0 0 4px #f0a12e22}
.project-priority-strip{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;padding:13px 16px;margin-bottom:16px;border:1px solid #f0b2ad;border-radius:18px;background:linear-gradient(105deg,#fff2ef,#fffaf7 65%,#fff);box-shadow:0 8px 20px #a94c3d12}
.priority-number{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#e64d42;color:white;font-weight:850;font-size:14px;box-shadow:0 5px 12px #e64d4238}
.project-priority-strip div{display:grid;gap:3px}.project-priority-strip small{color:#bc554b;font-size:8px;font-weight:850;letter-spacing:1px}.project-priority-strip strong{font-size:14px}.project-priority-strip div span{font-size:10px;color:#74797e}.priority-arrow{font-size:20px;color:#c9554b}
.project-board-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:12px}
.project-lane{min-width:0;padding:11px;border:1px solid #ffffffb8;border-radius:19px;background:#ffffff61;box-shadow:inset 0 1px #fff8}
.project-lane>header{display:flex;align-items:center;gap:9px;padding:2px 3px 11px;border-bottom:1px solid #33333312}
.project-lane>header>div{flex:1}.lane-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;font-size:17px;font-weight:800}
.lane-todo .lane-icon{background:#fff0e8;color:#e87536}.lane-doing .lane-icon{background:#fff6dc;color:#bd8a20}.lane-done .lane-icon{background:#e5f6ed;color:#3a9a68}
.project-lane h3{margin:0;font-size:14px}.project-lane header small{display:block;margin-top:2px;color:#7c8287;font-size:9px}.project-lane>header>b{display:grid;place-items:center;min-width:25px;height:25px;border-radius:9px;background:#fff;color:#697077;font-size:10px}
.project-task{margin-top:8px;border:1px solid #ffffffa8;border-left:3px solid #bbb;border-radius:12px;background:#ffffffa3;box-shadow:0 3px 9px #34383d08;transition:transform .16s ease,box-shadow .16s ease}
.project-task:hover{transform:translateY(-1px);box-shadow:0 7px 15px #34383d12}.project-task summary{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:7px;padding:9px 8px;list-style:none;cursor:pointer}.project-task summary::-webkit-details-marker{display:none}
.task-rank{display:grid;place-items:center;width:21px;height:21px;border-radius:7px;background:#f0f1f2;color:#747a7e;font-size:9px;font-weight:850}.project-task summary span:nth-child(2){min-width:0}.project-task summary strong,.project-task summary small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-task summary strong{font-size:10px}.project-task summary small{margin-top:3px;color:#81878c;font-size:8px}.project-task summary i{padding:4px 6px;border-radius:99px;background:#f1f1f1;color:#70767a;font-size:7px;font-style:normal;font-weight:800}
.priority-high{border-left-color:#e36050}.priority-high summary i{background:#ffe8e3;color:#b84537}.priority-medium{border-left-color:#dfa52e}.priority-medium summary i{background:#fff1cc;color:#946915}.priority-low{border-left-color:#528ed2}.priority-low summary i{background:#e6f1ff;color:#3b6fae}.priority-done{border-left-color:#48a879}.priority-done summary i{background:#e0f4e9;color:#39885f}.priority-done .task-rank{background:#e0f4e9;color:#39885f}
.project-task>p{margin:0;padding:0 10px 10px 37px;color:#686f75;font-size:9px;line-height:1.45}.project-board-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 2px 0;color:#7c8287;font-size:9px}.project-board-footer>span:last-child{display:flex;align-items:center;gap:5px;white-space:nowrap}.priority-dot{width:7px;height:7px;margin-left:5px;border-radius:50%}.priority-dot.high{background:#e36050}.priority-dot.medium{background:#dfa52e}.priority-dot.low{background:#528ed2}
@media(max-width:820px){.project-board-columns{grid-template-columns:1fr}.project-lane{padding:10px}.project-board-header{flex-direction:column}.project-board-footer{align-items:flex-start;flex-direction:column}}
/* O quadro segue a largura da própria caixa, não a do ecrã: numa caixa estreita do ecrã dividido
   as três faixas empilham-se e os títulos ficam numa linha com reticências, nunca uma palavra por linha. */
@container project-board (max-width:640px){
.project-board-header{flex-direction:column;gap:8px;margin-bottom:12px}
.project-board-header h2{font-size:19px}
.project-board-columns{grid-template-columns:1fr;gap:9px}
.project-lane{padding:9px}
.project-lane>header{padding-bottom:8px}
.project-board-footer{align-items:flex-start;flex-direction:column;gap:6px}
}
@container project-board (max-width:460px){
.project-board-signal{display:none}
.project-priority-strip{grid-template-columns:auto 1fr;gap:10px;padding:10px 12px}
.priority-arrow{display:none}
.project-task>p{padding-left:10px}
}
@media(prefers-reduced-motion:reduce){.project-task{transition:none}.project-task:hover{transform:none}}

/* Native iOS inspired personal cards and realistic vehicle render. */
.info-card{background:linear-gradient(145deg,rgba(251,251,252,.72),rgba(245,245,246,.5));box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 16px 32px rgba(80,84,89,.12)}
.info-card .card-topline{align-items:center}
.info-card .sprite-icon{width:42px;height:42px;border-radius:12px}
.info-card .section-title h2{font-size:17px;letter-spacing:-.5px}
.ios-list{margin-top:12px;border:1px solid rgba(255,255,255,.76);border-radius:18px;overflow:hidden;background:rgba(255,255,255,.44);box-shadow:inset 0 1px rgba(255,255,255,.8)}
.ios-calendar-row,.ios-reminder-row{min-height:68px;display:grid;align-items:center;gap:9px;padding:9px 10px}
.ios-calendar-row{grid-template-columns:4px 42px minmax(0,1fr) 10px}
.ios-reminder-row{grid-template-columns:25px minmax(0,1fr) 10px}
.calendar-line{width:4px;height:42px;border-radius:99px;background:var(--calendar-color,#a4a9ae)}
.ios-calendar-row time{font-size:10px;color:#656b70;font-weight:650;font-variant-numeric:tabular-nums}
.ios-row-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
.ios-row-copy strong{font-size:11px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ios-row-copy small{font-size:8px;color:#70767c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ios-chevron{font-size:20px;font-weight:300;color:#959a9f;line-height:1}
.ios-list-footer{height:27px;border-top:1px solid rgba(147,152,157,.18);display:flex;align-items:center;gap:6px;padding:0 10px;color:#6f757b;font-size:7px;font-weight:650;letter-spacing:.1px}
.ios-calendar-dot{width:6px;height:6px;border-radius:50%;background:#92989d;box-shadow:0 0 0 3px rgba(110,116,122,.12)}
.ios-reminder-ring{width:23px;height:23px;border:2px solid #e31837;border-radius:50%;box-shadow:inset 0 0 0 4px rgba(255,255,255,.4),0 3px 8px rgba(227,24,55,.12)}
.reminder-colors i{display:block;width:6px;height:6px;border-radius:50%}
.reminder-colors i:nth-child(1){background:#ff453a}.reminder-colors i:nth-child(2){background:#ff9f0a}.reminder-colors i:nth-child(3){background:#9c9ca6}.reminder-colors span{margin-left:2px}
.right-stack .car-card{background:linear-gradient(150deg,rgba(249,249,249,.7),rgba(239,239,240,.43));box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 36px rgba(72,76,79,.13)}
.right-stack .car-visual{isolation:isolate;overflow:visible}
.right-stack .car-visual i{z-index:0;width:64%;height:21%;bottom:13px;background:rgba(113,119,124,.18);filter:blur(17px)}
.right-stack .car-visual .model3-render{position:relative;z-index:1;display:block;width:100%;height:100%;max-height:205px;object-fit:contain;filter:drop-shadow(0 14px 14px rgba(64,67,70,.17))}
@media(max-height:760px) and (min-width:1081px){.ios-list{margin-top:8px}.ios-calendar-row,.ios-reminder-row{min-height:56px;padding-block:6px}.ios-list-footer{height:22px}.right-stack .car-visual .model3-render{max-height:180px}}

html:has(body.picture-in-picture),body.picture-in-picture{height:100%;min-height:100%}
body.picture-in-picture{overflow:auto}
body.picture-in-picture .dashboard{min-height:100%;height:auto;padding:8px;gap:8px}
body.picture-in-picture .topbar{position:sticky;top:0;z-index:5}
body.picture-in-picture .workspace{display:flex;flex-direction:column;gap:8px}
body.picture-in-picture .left-stack,body.picture-in-picture .right-stack{gap:8px}
body.picture-in-picture .left-stack .map-card{min-height:250px}
body.picture-in-picture .left-stack .music-card{min-height:220px}
body.picture-in-picture .personal-grid{height:auto;min-height:0;grid-template-columns:1fr}
body.picture-in-picture .info-card{min-height:150px}
body.picture-in-picture .right-stack .car-card{min-height:290px}
body.picture-in-picture .footer-bar{display:none}
body.picture-in-picture .apps-panel{position:fixed}

/* In-page destination search stays above the map. */
.map-results{position:absolute;z-index:4;left:13px;right:13px;bottom:62px;max-height:52%;overflow:auto;border-radius:17px;padding:7px;background:rgba(251,251,251,.94);box-shadow:0 12px 28px rgba(50,53,55,.2);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.map-results-status{margin:3px 7px 6px;color:#62686d;font-size:9px;line-height:1.35}
.map-result{display:flex;width:100%;flex-direction:column;gap:3px;padding:8px 9px;border:0;border-radius:11px;background:transparent;color:#27292b;text-align:left;cursor:pointer}
.map-result:hover,.map-result:focus-visible{background:rgba(227,24,55,.1);outline:none}
.map-result strong{font-size:10px;line-height:1.25}
.map-result small{color:#70767b;font-size:8px;line-height:1.3}
.map-search button:disabled{opacity:.72;cursor:progress}
.player-controls button:disabled{opacity:.38;cursor:not-allowed;box-shadow:none}
.map-legend{position:absolute;z-index:2;left:16px;top:76px;display:flex;gap:10px;padding:6px 9px;border-radius:11px;background:rgba(251,251,252,.8);backdrop-filter:blur(12px);color:#3e4245;font-size:8px;font-weight:700}.map-legend span{display:flex;align-items:center;gap:5px}.map-legend i{display:block;width:9px;height:9px;border-radius:50%}.map-legend .dot-current{background:#e31837;box-shadow:0 0 0 3px rgba(227,24,55,.2)}.map-legend .line-trail{width:13px;height:3px;border-radius:2px;background:#ed5c37}
.compact-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:3}.compact-art img[hidden]{display:none}
.connection-panel{position:absolute;z-index:12;right:22px;bottom:100px;width:min(420px,calc(100vw - 32px));border-radius:24px;padding:20px;background:rgba(250,250,251,.94);box-shadow:0 20px 55px rgba(48,51,53,.25);backdrop-filter:blur(24px)}.connection-panel h2{margin:5px 0;font-size:20px}.connection-panel p{font-size:10px;color:#64696e;line-height:1.4}.connection-close{position:absolute;right:13px;top:13px}.connection-actions{display:flex;gap:8px}.connection-status-list{display:grid;gap:7px;margin:13px 0}.connection-status-list div{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.62)}.connection-status-list strong{font-size:10px}.connection-status-list small{font-size:9px;color:#6a7075;text-align:right}.connection-panel label{display:block;margin-top:10px;font-size:9px;color:#5d6367}.connection-panel input{width:100%;height:36px;border:0;border-radius:9px;padding:0 10px;background:rgba(255,255,255,.85);font-size:10px;color:#3e4245}.connection-panel small{font-size:8px;color:#6a7075;line-height:1.4}.whatsapp-open{display:inline-flex;margin:6px 0;color:#13704b;font-size:10px;font-weight:700}.connection-hint{margin-bottom:0}
.map-frame{inset:0;height:100%;z-index:0}#live-map{width:100%;height:100%;background:#e9ebec}.map-symbol{display:grid;place-items:center;flex:none;width:45px;height:45px;border-radius:13px;background:linear-gradient(135deg,#a9aeb1,#e31837);color:#fff;font-size:32px;line-height:1}.leaflet-control-attribution{font-size:9px!important}.leaflet-bottom.leaflet-right{bottom:78px}.leaflet-container{font-family:inherit}
.map-switch{position:absolute;z-index:3;top:76px;left:14px;display:flex;gap:4px;padding:4px;border-radius:12px}.map-switch button{border:0;border-radius:9px;padding:7px 10px;background:transparent;color:#4b4f52;font-family:inherit;font-weight:700;font-size:10px;cursor:pointer}.map-switch button[aria-pressed=true]{background:#fff;color:#e31837;box-shadow:0 2px 8px #32363817}.map-legend{top:118px;font-size:7px}.map-legend .line-route{width:13px;height:3px;border-radius:2px;background:#e31837}#live-map[hidden],.map-legend[hidden],.route-summary[hidden]{display:none}.route-summary{position:absolute;z-index:3;left:14px;right:14px;bottom:94px;padding:10px 12px;border-radius:14px;display:grid;grid-template-columns:1fr auto;gap:4px;color:#36393c}.route-summary strong{font-size:13px}.route-summary span{grid-column:1/-1;font-size:11px}.route-summary small{grid-column:1/-1;font-size:8px;color:#62686c}.route-summary button{grid-column:2;grid-row:1;border:0;background:transparent;color:#e31837;font-size:10px;cursor:pointer}.route-summary ol{grid-column:1/-1;max-height:115px;overflow:auto;margin:5px 0;padding-left:20px;font-size:10px;line-height:1.7}.phone-page{overflow:auto;min-height:100vh;min-height:100dvh;padding:24px 14px}.phone-card{position:relative;max-width:480px;margin:0 auto;border-radius:26px;padding:24px}.phone-card h1{font-size:27px;line-height:1.1}.phone-card h2{font-size:18px;margin-top:24px}.phone-card label{display:block;font-size:13px;font-weight:700;margin:16px 0 8px}.phone-card input{display:block;width:100%;height:44px;padding:10px 12px;border:1px solid #ffffffb3;border-radius:12px;background:#ffffffb3;margin-bottom:12px;font-size:14px}.phone-card p{font-size:14px;line-height:1.5}.phone-card .phone-help{font-size:12px;color:#585d61}.phone-status{font-weight:700}.phone-actions{display:flex;gap:8px}.phone-place-results{display:grid;gap:8px;margin-top:12px}.phone-place-results button{height:auto;min-height:44px;white-space:normal;text-align:left}.phone-card .whatsapp-open{display:block;margin-top:12px}.phone-card [hidden]{display:none}
.connection-panel{max-height:calc(100vh - 120px);overflow:auto}
.connection-whatsapp-form{display:grid;gap:5px;margin:12px 0;padding:11px;border-radius:13px;background:rgba(255,255,255,.52)}.connection-whatsapp-form>strong{font-size:11px}.connection-whatsapp-form .secondary-button{justify-self:start;min-height:36px}.connection-whatsapp-form #whatsapp-cloud-state{display:block}
.connection-panel.pairing-open .connection-status-list,.connection-panel.pairing-open .connection-hint,.connection-panel.pairing-open .whatsapp-open,.connection-panel.pairing-open #connection-state{display:none}
#phone-pair-details>small{display:block;margin-top:8px}
.shortcut-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}
.shortcut-download{display:flex;align-items:center;justify-content:center;min-height:36px;padding:8px 10px;border-radius:10px;background:#e31837;color:#fff!important;font-size:10px;font-weight:750;text-align:center;text-decoration:none}
@media(max-width:720px){.map-results{left:8px;right:8px;bottom:57px;max-height:48%}}

/* Música: capa grande e metadados reais, sem controlos de reprodução falsos. */
.left-stack .music-card{height:auto;min-height:196px;grid-template-columns:168px minmax(0,1fr);align-items:center;gap:20px}
.big-art{width:160px;height:160px;border-radius:24px}
.big-art span{font-size:52px}
.left-stack .track-info h1{font-size:26px;margin:5px 0 7px}
.music-artist{margin:0 0 4px;color:#44484b;font-size:15px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.music-album{margin:0 0 7px;color:#6a7076;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.music-playback{margin:6px 0 0;color:#7b8288;font-size:11px;font-weight:650}
.music-playback[hidden]{display:none}
.source-label:empty{display:none}
.big-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:3}
.big-art img[hidden]{display:none}
.attempt-detail{display:block;margin-top:6px;color:#62686c;font-size:9px;line-height:1.5;word-break:break-word}

/* Mapa: seguimento, recentrar e rotação pelo sentido de marcha. */
.map-rotor{position:absolute;inset:0;overflow:hidden}
.map-rotor[hidden]{display:none}
.map-rotor.rotating{--map-rotation:0deg}
.map-rotor.rotating #live-map{position:absolute;width:142%;height:142%;left:-21%;top:-21%;transform:rotate(var(--map-rotation,0deg));transform-origin:50% 50%;will-change:transform;transition:transform .45s linear}
.map-rotor.rotating .leaflet-control-container{display:none}
.map-attribution{position:absolute;z-index:3;right:10px;bottom:62px;padding:2px 6px;border-radius:7px;background:rgba(251,251,252,.72);color:#44484b;font-size:8px}
.map-attribution a{color:#e31837}
.map-attribution[hidden]{display:none}
.map-orientation{position:absolute;z-index:3;top:76px;right:14px;border:0;border-radius:12px;padding:9px 13px;color:#4b4f52;font-family:inherit;font-weight:700;font-size:10px;cursor:pointer}
.map-orientation[aria-pressed=true]{background:#fff;color:#e31837;box-shadow:0 2px 8px #32363817}
.map-orientation[hidden]{display:none}
.map-switch{align-items:center}
.map-switch-group{display:flex;align-items:center;gap:3px}
#map-dimension-choice[hidden]{display:none}
.map-recenter{position:absolute;z-index:4;right:14px;top:128px;height:46px;padding:0 20px;font-size:12px;border-radius:23px;box-shadow:0 8px 22px rgba(227,24,55,.35)}
.map-recenter[hidden]{display:none}
@media(max-width:720px){.left-stack .music-card{grid-template-columns:120px minmax(0,1fr);min-height:170px}.big-art{width:116px;height:116px}.left-stack .track-info h1{font-size:21px}.map-recenter{top:120px;height:42px;font-size:10px;padding:0 14px}.map-attribution{bottom:50px;right:8px}}

/* Ecrã inteiro do browser e ecrã limpo do painel. */
.fullscreen-button{display:inline-flex;align-items:center;gap:8px;height:44px;min-width:44px;padding:0 18px;border:1px solid rgba(255,255,255,.42);border-radius:22px;background:rgba(255,255,255,.22);color:#fff;font-family:inherit;font-weight:700;font-size:12px;letter-spacing:-.2px;cursor:pointer;white-space:nowrap}
.fullscreen-button:active{transform:scale(.97)}
.fullscreen-button:disabled{opacity:.45;cursor:default}
#dashboard .tesla-fullscreen-quick{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin:0 0 14px 8px;padding:10px;border-radius:14px;color:inherit;cursor:pointer;touch-action:manipulation}
#dashboard .tesla-fullscreen-quick svg{width:24px;height:24px}
#dashboard .tesla-fullscreen-quick:focus-visible{outline:2px solid currentColor;outline-offset:2px}
#dashboard[data-dock-position=left] .tesla-fullscreen-quick{align-self:center;margin:8px 0 0}
.fullscreen-button[aria-pressed=true]{background:rgba(255,255,255,.88);border-color:rgba(255,255,255,.9);color:#e31837}
.fullscreen-icon{font-size:16px;line-height:1}
.connection-diagnostic{margin-top:12px;padding:9px 11px;border-radius:12px;background:rgba(255,255,255,.62)}
.connection-diagnostic strong{display:block;font-size:10px}
.connection-diagnostic small{display:block;margin-top:3px;font-size:9px;color:#6a7075;line-height:1.45;word-break:break-word;white-space:pre-line}

/* Ecrã limpo: esconde o acessório e dá o espaço ao mapa e à música. Sai com um toque
   no mesmo botão, que fica sempre visível na barra superior. */
body.clean-screen .privacy-note,
body.clean-screen .top-center,
body.clean-screen .vehicle-chip,
body.clean-screen .brand small,
body.clean-screen #map-note,
body.clean-screen .map-legend,
body.clean-screen .music-album,
body.clean-screen .music-playback,
body.clean-screen .source-label,
body.clean-screen .pip-button{display:none}
body.clean-screen .dashboard{padding:8px 12px 6px;gap:8px}
body.clean-screen .topbar{height:50px}
body.clean-screen .workspace{grid-template-columns:minmax(0,1.6fr) minmax(340px,.4fr)}
/* Uma coluna à direita: com a altura livre do ecrã limpo os cartões cabem inteiros
   e o mapa e a música ficam com a largura que sobra. */
body.clean-screen .personal-grid{grid-template-columns:1fr;height:auto}
body.clean-screen .left-stack .music-card{min-height:214px}
body.clean-screen .big-art{width:184px;height:184px}
body.clean-screen .left-stack .music-card{grid-template-columns:192px minmax(0,1fr)}
body.clean-screen .left-stack .track-info h1{font-size:32px}
body.clean-screen .music-artist{font-size:18px}
body.clean-screen .footer-bar{height:74px}
body.clean-screen .dock{height:70px}
@media(max-width:1080px){body.clean-screen .workspace{grid-template-columns:1fr}}

/* Ecrã inteiro: a altura extra vai para o mapa e para a música, sem cortar o dock. */
body.is-fullscreen .dashboard{height:100vh;height:100dvh;padding:12px 18px 10px}
body.is-fullscreen .left-stack .map-card{min-height:0}
@media(min-height:900px){
  body.is-fullscreen .left-stack .music-card,body.clean-screen .left-stack .music-card{min-height:240px}
  body.is-fullscreen .big-art,body.clean-screen .big-art{width:208px;height:208px}
  body.is-fullscreen .left-stack .music-card,body.clean-screen .left-stack .music-card{grid-template-columns:216px minmax(0,1fr)}
  body.is-fullscreen .left-stack .track-info h1,body.clean-screen .left-stack .track-info h1{font-size:36px}
  body.is-fullscreen .footer-bar,body.clean-screen .footer-bar{height:88px}
}

/* Capa: real com cantos arredondados e sombra; sem capa, espaço reservado assumido. */
.album-art.has-art{background:rgba(35,37,39,.18);box-shadow:0 18px 34px rgba(61,63,67,.3),inset 0 1px rgba(255,255,255,.5)}
.album-art.has-art::before{display:none}
.album-art.has-art .art-note,.album-art.has-art i{display:none}
.album-art.is-placeholder{background:linear-gradient(150deg,rgba(236,236,237,.95),rgba(215,216,218,.9));box-shadow:inset 0 0 0 2px rgba(255,255,255,.65),0 10px 22px rgba(70,74,78,.14)}
.album-art.is-placeholder::before{display:none}
.album-art.is-placeholder::after{content:"";position:absolute;inset:7px;border:2px dashed rgba(100,105,110,.4);border-radius:17px}
.album-art.is-placeholder .art-note{color:#848a90;text-shadow:none;font-size:40px;transform:translateY(-10px)}
.album-art.is-placeholder i{display:none}
.art-caption{position:absolute;z-index:4;left:8px;right:8px;bottom:12px;color:#696f75;font-size:9px;font-weight:750;text-align:center;letter-spacing:.2px;line-height:1.25}
.album-art.has-art .art-caption{bottom:8px;padding:4px 6px;border-radius:8px;background:rgba(25,26,27,.62);color:#fff}
.art-caption[hidden]{display:none}
.demo-badge{display:inline-flex;align-items:center;margin-left:7px;padding:4px 8px;border-radius:99px;background:#b4441f;color:#fff;font-size:8px;font-weight:800;letter-spacing:.8px}
.demo-badge[hidden]{display:none}
@media(max-width:720px){.fullscreen-button{padding:0 12px;font-size:11px}body.clean-screen .big-art{width:132px;height:132px}body.clean-screen .left-stack .music-card{grid-template-columns:140px minmax(0,1fr)}}

/* Diagnóstico do último envio do Atalho e passos da automação. */
.diagnostic-list{list-style:none;margin:7px 0 4px;padding:0;display:grid;gap:4px}
.diagnostic-list li{display:grid;grid-template-columns:86px minmax(0,1fr);gap:7px;align-items:start;padding:5px 7px;border-radius:9px;background:rgba(255,255,255,.6)}
.diagnostic-list strong{font-size:9px;color:#424649}
.diagnostic-list span{font-size:9px;line-height:1.4;color:#6a7076}
.diagnostic-list li::before{display:none}
.diagnostic-list .diagnostic-ok strong::before{content:"✓ ";color:#17794b;font-weight:800}
.diagnostic-list .diagnostic-fail{background:rgba(255,236,230,.82)}
.diagnostic-list .diagnostic-fail strong::before{content:"✕ ";color:#b4441f;font-weight:800}
.automation-button{width:100%;margin-top:9px;height:38px;border-radius:12px}
.automation-steps{margin:9px 0 0;padding-left:19px;display:grid;gap:5px;font-size:9px;line-height:1.5;color:#62686c}
.automation-steps[hidden]{display:none}
.automation-steps strong{color:#3e4245}

/* Atalhos já configurados: destaque sobre os que ainda pedem o código. */
.ready-links{grid-template-columns:1fr}
.shortcut-download.ready{background:#17794b;min-height:42px;font-size:11px}
.ready-note{display:block;margin-top:8px;padding:8px 10px;border-radius:10px;background:rgba(23,121,75,.1);color:#245c45!important}
.shortcut-download.diagnostic{background:#898692;min-height:42px;font-size:11px}
.shortcut-download.v8{background:#e31837;min-height:44px;font-size:12px}

/* ===== Interface v2: mapa grande, música ao lado, vistas no dock, barras discretas ===== */
#dashboard{height:100vh;height:100dvh;padding:0 14px 6px;gap:6px;min-height:0}
body{overflow:hidden}
#dashboard .topbar{display:none}
#dashboard .brand strong{font-size:14px}
#dashboard .apple-mark{font-size:20px}
#dashboard .top-center{font-size:10px;font-weight:600;opacity:.78}
#dashboard .vehicle-chip{display:none}
#dashboard .top-actions{gap:7px}
#dashboard .clock{font-size:12px}
#dashboard .round-button{width:30px;height:30px;font-size:16px}
#dashboard .fullscreen-button{width:30px;min-width:30px;height:30px;padding:0;justify-content:center;border-radius:50%}
#dashboard .fullscreen-button #fullscreen-label{display:none}
#dashboard .fullscreen-button[aria-pressed=true] .fullscreen-icon{transform:rotate(180deg)}

#dashboard .workspace{position:relative;display:grid;grid-template-columns:minmax(0,1.9fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:8px;min-height:0;grid-template-areas:"map music";transition:grid-template-columns .2s ease}
#dashboard .left-stack,#dashboard .right-stack,#dashboard .personal-grid{display:contents}
#dashboard #map-card{grid-area:map;min-height:0;flex:none}
#dashboard #music-card{grid-area:music}
#dashboard #calendar-card{grid-area:cal}
#dashboard #reminders-card{grid-area:rem}
#dashboard .car-card{grid-area:car}
#dashboard #calendar-card,#dashboard #reminders-card,#dashboard .car-card,#dashboard .info-card{min-height:0;height:auto}
#dashboard:is([data-view=map],[data-view=music]) :is(#calendar-card,#reminders-card,.car-card){display:none}
#dashboard[data-map-side=right] .workspace{grid-template-areas:"music map"}
#dashboard[data-view=map][data-map-side=right] .workspace,#dashboard[data-view=music][data-map-side=left] .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.9fr)}
#dashboard[data-media-mode=solo][data-view=map] .workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"map"}
#dashboard[data-media-mode=solo][data-view=music] .workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"music"}
#dashboard[data-media-mode=solo][data-view=map] #music-card,#dashboard[data-media-mode=solo][data-view=music] #map-card{display:none}
#dashboard[data-view=agenda] .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1.2fr) minmax(0,1fr);grid-template-areas:"cal rem" "car music"}
#dashboard[data-view=agenda] #map-card{display:none}
#dashboard .car-status[hidden]{display:none}
#dashboard[data-view=vehicle] .workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"car"}
#dashboard[data-view=calendar] .workspace{grid-template-columns:minmax(0,1.9fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(154px,.4fr);grid-template-areas:"cal music" "rem music"}
#dashboard[data-view=reminders] .workspace{grid-template-columns:minmax(0,1.9fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(154px,.4fr);grid-template-areas:"rem music" "cal music"}
#dashboard[data-view=calendar][data-personal-side=right] .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.9fr);grid-template-areas:"music cal" "music rem"}
#dashboard[data-view=reminders][data-personal-side=right] .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.9fr);grid-template-areas:"music rem" "music cal"}
#dashboard[data-view=calendar][data-personal-mode=solo] .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"cal"}
#dashboard[data-view=reminders][data-personal-mode=solo] .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"rem"}
#dashboard[data-view=vehicle] :is(#map-card,#music-card,#calendar-card,#reminders-card),
#dashboard:is([data-view=calendar],[data-view=reminders]) :is(#map-card,.car-card),
#dashboard[data-view=calendar][data-personal-mode=solo] :is(#music-card,#reminders-card),
#dashboard[data-view=reminders][data-personal-mode=solo] :is(#music-card,#calendar-card){display:none}
#dashboard[data-view=vehicle] .car-card{max-width:100%;width:100%;height:100%}
#dashboard[data-view=vehicle] .car-visual model-viewer{width:min(95%,1050px);max-height:none}
#dashboard[data-view=vehicle] .car-visual .model3-render{max-height:none}
#dashboard[data-view=calendar] .info-card .ios-list,#dashboard[data-view=reminders] .info-card .ios-list{max-height:calc(100% - 70px)}
#dashboard .info-card .ios-list{max-height:calc(100% - 62px);overflow:auto}
#dashboard .right-stack .car-visual .model3-render{max-height:min(150px,18vh);max-height:min(150px,18dvh)}
.car-turntable{cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none}
.car-turntable:active{cursor:grabbing}
.car-turntable:focus-visible{outline:2px solid #e31837;outline-offset:-4px;border-radius:14px}
.car-turntable model-viewer{position:absolute;z-index:1;inset:0;margin:auto;display:block;width:100%;height:100%;--poster-color:transparent;touch-action:pan-y;visibility:hidden;opacity:0;transition:opacity .35s ease}
.car-turntable.is-ready model-viewer{visibility:visible;opacity:1}
.car-turntable model-viewer::part(default-progress-bar){display:none}
.car-turntable-hint{position:absolute;z-index:2;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;font-weight:650;color:#73797f;background:rgba(255,255,255,.56);border-radius:99px;padding:3px 9px;pointer-events:none}
.car-model-credit{position:absolute;z-index:3;right:2px;bottom:1px;color:#72797f;font-size:7px;text-decoration:none}
.car-model-credit:hover{text-decoration:underline}
.car-turntable.has-error{cursor:default}
.car-turntable.has-error .car-turntable-hint{display:none}

/* Cartão de música: vertical na coluna da direita, largo na vista Música. */
#dashboard .music-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;height:auto;min-height:0;padding:16px 18px;text-align:center;border-radius:26px}
#dashboard .music-card .track-info{width:100%;min-width:0}
#dashboard .big-art{flex:none;width:clamp(120px,calc(100vh - 400px),340px);width:clamp(120px,calc(100dvh - 400px),340px);height:auto;aspect-ratio:1;max-width:100%;border-radius:22px}
#dashboard .music-title-line{justify-content:center;gap:8px;flex-wrap:wrap}
#dashboard .left-stack .track-info h1,#dashboard #music-title{font-size:clamp(20px,2.1vw,28px);line-height:1.1;margin:8px 0 5px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#dashboard .music-artist{font-size:16px}
#dashboard .music-album{font-size:12px}
#dashboard .source-label{font-size:9px}
#dashboard[data-view=music][data-media-mode=split] .big-art{width:clamp(150px,calc(100vh - 360px),380px);width:clamp(150px,calc(100dvh - 360px),380px)}
#dashboard[data-view=music][data-media-mode=split] #music-title{font-size:clamp(24px,2.8vw,38px)}
#dashboard[data-view=music][data-media-mode=solo] .music-card{flex-direction:row;gap:44px;padding:24px 48px;text-align:left}
#dashboard[data-view=music][data-media-mode=solo] .big-art{width:clamp(200px,calc(100vh - 190px),520px);width:clamp(200px,calc(100dvh - 190px),520px)}
#dashboard[data-view=music][data-media-mode=solo] .music-title-line{justify-content:flex-start}
#dashboard[data-view=music][data-media-mode=solo] #music-title{font-size:clamp(30px,4vw,56px);-webkit-line-clamp:3}
#dashboard[data-view=music][data-media-mode=solo] .music-artist{font-size:clamp(18px,2.2vw,28px)}
#dashboard[data-view=music][data-media-mode=solo] .music-album{font-size:clamp(14px,1.5vw,19px)}
#dashboard[data-view=agenda] .music-card{flex-direction:row;gap:18px;padding:14px 18px;text-align:left}
#dashboard[data-view=agenda] .big-art{width:clamp(90px,17vh,150px);width:clamp(90px,17dvh,150px)}
#dashboard[data-view=agenda] .music-title-line{justify-content:flex-start}

/* Pesquisa no topo, acessível com o teclado; estado e comandos da rota em baixo. */
#dashboard .map-header{left:10px;right:auto;top:auto;bottom:56px;transform:none;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#dashboard .map-header .section-title,#dashboard .map-header .service-state small{display:none}
#dashboard .map-header .service-state{min-width:0}
#dashboard .map-header .state-pill{padding:7px 13px;font-size:11px;background:rgba(251,251,252,.9);box-shadow:0 4px 14px rgba(59,63,66,.18)}
#dashboard .state-pill.is-stale{background:#fff1da;color:#9a5410}
#dashboard .map-switch{top:auto;bottom:10px;left:10px}
#dashboard .map-switch button{padding:7px 11px;font-size:11px}
#dashboard .map-orientation{top:auto;bottom:10px;right:10px;padding:8px 13px}
#dashboard .map-recenter{top:auto;bottom:56px;right:10px}
#dashboard .map-legend,#dashboard #map-note{display:none}
#dashboard .map-search{left:10px;right:auto;top:10px;bottom:auto;width:min(540px,calc(100% - 20px));padding:5px;border-radius:16px}
#dashboard .map-search input{height:38px}
#dashboard .map-search .primary-button,#dashboard .map-search .secondary-button{height:38px}
#dashboard .map-results{left:10px;right:auto;top:66px;bottom:auto;width:min(540px,calc(100% - 20px))}
#dashboard .route-summary{left:10px;right:auto;bottom:100px;width:min(540px,calc(100% - 20px));padding:8px 12px}
#dashboard .route-summary #route-source{display:none}
#dashboard .map-attribution{bottom:3px;right:6px}
#dashboard .leaflet-bottom.leaflet-right{bottom:22px}


/* Ajustes compactos para o rodapé do dashboard. */
#dashboard .footer-bar{height:64px}
#dashboard .dock{height:60px;border-radius:24px;padding:4px 8px}
#dashboard .dock-item{width:68px;height:52px;gap:2px;font-size:9px}
#dashboard .dock .sprite-icon{zoom:1}
#dashboard .dock .whatsapp-logo{width:36px;height:36px}
#dashboard .tesla-dock-mark{display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:#dc1d2d;color:white;font:800 25px/1 Georgia,serif;box-shadow:0 4px 10px rgba(150,17,35,.2)}
#dashboard[data-view=vehicle] .right-stack .car-visual model-viewer{max-height:none;height:100%;width:min(96%,1100px)}
#dashboard[data-view=vehicle] .right-stack .car-visual .model3-render{max-height:none}
#dashboard .car-card{position:relative}
#dashboard .car-settings-toggle{position:relative;z-index:4;flex:none;width:31px;height:31px;border:1px solid rgba(104,110,115,.16);border-radius:50%;background:rgba(255,255,255,.48);color:#7f858b;font-size:18px;line-height:1;cursor:pointer}
#dashboard .car-settings-toggle:hover,#dashboard .car-settings-toggle[aria-expanded=true]{background:rgba(255,255,255,.9);color:#474b4e}
#dashboard .car-settings[hidden],#dashboard .car-loading[hidden]{display:none}
#dashboard .car-settings{position:absolute;z-index:8;top:55px;right:16px;width:min(280px,calc(100% - 32px));max-height:min(72vh,520px);overflow:auto;padding:14px;border:1px solid rgba(255,255,255,.82);border-radius:18px;background:rgba(248,249,249,.97);box-shadow:0 16px 38px rgba(66,69,72,.2);display:flex;flex-direction:column;gap:10px;color:#3d4043}
#dashboard .car-settings-heading{display:flex;justify-content:space-between;align-items:center;font-size:13px}
#dashboard .car-settings-heading button{border:0;background:none;color:#72787e;font-size:20px;cursor:pointer}
#dashboard .car-settings label,#dashboard .car-settings-label{font-size:10px;font-weight:700;color:#60656a}
#dashboard .car-settings select{width:100%;padding:9px 10px;border:1px solid #d4d7d9;border-radius:10px;background:white;color:#34373a;font:12px inherit}
#dashboard .car-color-options{display:flex;gap:10px}
#dashboard .car-color-options button{width:29px;height:29px;border:2px solid rgba(76,80,84,.15);border-radius:50%;background:var(--swatch);cursor:pointer}
#dashboard .car-color-options button[aria-pressed=true]{outline:2px solid #565b5f;outline-offset:2px}
#dashboard [data-car-color=white]{--swatch:#f6f6f6}#dashboard [data-car-color=black]{--swatch:#1a1b1d}#dashboard [data-car-color=red]{--swatch:#c21f32}#dashboard [data-car-color=blue]{--swatch:#e31837}#dashboard [data-car-color=silver]{--swatch:#a8acb0}
#dashboard [data-seat-color=white]{--swatch:#f3eee6}#dashboard [data-seat-color=black]{--swatch:#171717}
#dashboard .car-wheel-options{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#dashboard .car-wheel-options button{min-height:34px;padding:6px 8px;border:1px solid rgba(104,110,115,.2);border-radius:10px;background:rgba(255,255,255,.68);color:#51575c;font:inherit;font-size:10px;font-weight:600;line-height:1.2;cursor:pointer}
#dashboard .car-wheel-options button[aria-pressed=true]{border-color:rgba(77,86,94,.55);background:rgba(228,232,235,.9);color:#262b2f;box-shadow:inset 0 0 0 1px rgba(77,86,94,.16)}
#dashboard .car-settings small{font-size:9px;line-height:1.4;color:#767d83}
#dashboard .car-loading{position:absolute;z-index:3;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:16px;color:rgba(255,255,255,.88);pointer-events:none}
#dashboard .car-loading-face{position:relative;display:grid;place-items:center;width:124px;height:124px;border-radius:50%;background:rgba(124,130,137,.1);box-shadow:inset 0 1px 1px rgba(255,255,255,.28),0 8px 28px rgba(73,77,80,.06);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
#dashboard .car-loading .car-loading-logo{position:relative;width:52px;height:58px;fill:currentColor;filter:drop-shadow(0 1px 1px rgba(73,77,80,.12))}
#dashboard .car-loading .car-loading-ring{position:absolute;inset:0;width:124px;height:124px;fill:none;filter:none;animation:car-loading-clock 1.8s linear infinite}
#dashboard .car-loading-dial{stroke:rgba(255,255,255,.24);stroke-width:1.5}
#dashboard .car-loading-hand{stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-dasharray:76 264}
#dashboard .car-turntable:not(.is-ready)>i{opacity:0}
#dashboard .car-turntable.has-error .car-loading-ring{display:none;animation:none}
#dashboard .car-turntable.has-error #car-loading-message{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal;text-align:center;color:#6a7075;font-size:11px}
#dashboard .dashboard-loading{position:fixed;z-index:30;inset:0;display:grid;place-items:center;background:rgba(205,207,210,.3);-webkit-backdrop-filter:blur(22px) saturate(.65);backdrop-filter:blur(22px) saturate(.65)}
#dashboard .dashboard-loading[hidden]{display:none}
#dashboard .dashboard-loading .car-loading{position:relative;top:auto;left:auto;transform:none}
@keyframes car-loading-clock{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}
@media(prefers-reduced-motion:reduce){#dashboard .car-loading .car-loading-ring{animation:none;transform:rotate(-90deg)}}
#dashboard[data-view=vehicle] .right-stack .car-visual model-viewer{width:min(90%,1040px)}
#dashboard[data-view=vehicle] .car-metrics{position:relative;z-index:1}
#dashboard .privacy-note{display:none}
#dashboard .toast{bottom:80px}
.connection-panel{bottom:80px}

/* Terço do ecrã do Tesla (≈900×690): comandos mais apertados. */
@media(max-width:1100px){
  #dashboard .map-switch button{padding:7px 9px;font-size:10px}
  #dashboard .big-art{width:clamp(110px,calc(100vh - 430px),300px);width:clamp(110px,calc(100dvh - 430px),300px)}
  #dashboard[data-view=music][data-media-mode=solo] .music-card{padding:20px 28px;gap:28px}
  #dashboard .brand strong{font-size:13px}
  #dashboard .map-header{left:10px;top:auto;bottom:56px;transform:none}
  #dashboard .map-recenter{top:auto;bottom:56px}
}
@media(max-width:640px){
  body{overflow:auto}
  #dashboard{height:auto;min-height:100vh;min-height:100dvh}
  #dashboard .workspace,#dashboard[data-view=agenda] .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"map" "music" "cal" "rem" "car"}
  #dashboard[data-view=map] #map-card{min-height:62vh;min-height:62dvh}
  #dashboard[data-view=agenda] .workspace{grid-template-areas:"cal" "rem" "car" "music"}
  #dashboard[data-view=vehicle] .workspace{grid-template-areas:"car"}
  #dashboard[data-view=calendar][data-personal-mode=split] .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"cal" "rem" "music"}
  #dashboard[data-view=reminders][data-personal-mode=split] .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"rem" "cal" "music"}
  #dashboard[data-view=calendar][data-personal-mode=split][data-personal-side=right] .workspace{grid-template-areas:"music" "cal" "rem"}
  #dashboard[data-view=reminders][data-personal-mode=split][data-personal-side=right] .workspace{grid-template-areas:"music" "rem" "cal"}
  #dashboard:is([data-view=map],[data-view=music])[data-media-mode=split] .workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"map" "music"}
  #dashboard:is([data-view=map],[data-view=music])[data-media-mode=split][data-map-side=right] .workspace{grid-template-areas:"music" "map"}
  #dashboard[data-view=music] #map-card{min-height:42vh;min-height:42dvh}
  #dashboard[data-view=music][data-media-mode=split] .music-card{min-height:56vh;min-height:56dvh}
  #dashboard[data-view=map][data-media-mode=split] .music-card{min-height:38vh;min-height:38dvh}
  #dashboard[data-view=music][data-media-mode=solo] .music-card{flex-direction:column;text-align:center;padding:20px;min-height:75vh;min-height:75dvh}
  #dashboard[data-view=music][data-media-mode=solo] .big-art{width:min(70vw,320px)}
  #dashboard .map-switch button{padding:6px 8px}
}

/* Organizar com os ícones: toque para prioridade, arrasto para escolher o lado. */
.layout-controls{display:flex;align-items:center;gap:3px;padding-right:6px;border-right:1px solid rgba(255,255,255,.26)}
.card-focus{display:block;flex:none;padding:0;border:0;border-radius:12px;background:none;cursor:pointer}
.card-focus:focus-visible{outline:2px solid #e31837;outline-offset:3px}
#dashboard[data-view=calendar] #calendar-card .section-title h2,#dashboard[data-view=reminders] #reminders-card .section-title h2{font-size:22px}
#dashboard:is([data-view=calendar],[data-view=reminders]) .info-card{padding:17px 20px}
#dashboard[data-view=calendar][data-personal-mode=split] #reminders-card,#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card{padding:12px 16px}
#dashboard[data-view=calendar][data-personal-mode=split] #reminders-card .ios-list,#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card .ios-list{margin-top:7px;max-height:calc(100% - 52px)}
#dashboard[data-view=calendar][data-personal-mode=split] #reminders-card .ios-reminder-row:nth-child(n+2),#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card .ios-calendar-row:nth-child(n+2){display:none}
#dashboard[data-view=calendar][data-personal-mode=split] #reminders-card .ios-reminder-row,#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card .ios-calendar-row{min-height:45px;padding-block:6px}
#dashboard[data-view=calendar][data-personal-mode=split] #reminders-card .ios-list-footer,#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card .ios-list-footer{height:22px}
.layout-button{width:42px;height:34px;padding:5px 7px;border:0;border-radius:10px;background:rgba(255,255,255,.16);color:#fff;cursor:pointer}
.layout-button:hover{background:rgba(255,255,255,.32)}
.layout-button svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.layout-button[aria-pressed=true]{background:rgba(255,255,255,.85);color:#e31837}
.layout-button:focus-visible,#dashboard .dock-item:focus-visible{outline:2px solid #fff;outline-offset:2px}
#dashboard .dock-item[data-view=map],#dashboard .dock-item[data-view=music]{touch-action:none;user-select:none;-webkit-user-select:none}
#dashboard .dock-item.is-dragging{opacity:.45}
.layout-drop-zones{position:absolute;inset:0;z-index:12;display:grid;grid-template-columns:1fr 1fr;gap:8px;pointer-events:none}
.layout-drop-zones>div{display:grid;place-items:center;border:2px dashed rgba(255,255,255,.95);border-radius:26px;background:rgba(71,75,79,.12);transition:background .15s,border-color .15s}
.layout-drop-zones>div.is-target{border-style:solid;border-color:#fff;background:rgba(227,24,55,.2)}
.layout-drop-zones span{padding:12px 22px;border-radius:18px;background:rgba(250,250,251,.94);color:#3e4144;font-size:16px;font-weight:650;box-shadow:0 8px 30px rgba(56,59,62,.16)}
.dock-drag-preview{position:fixed;z-index:50;display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 15px;border-radius:21px;background:rgba(250,250,250,.94);box-shadow:0 16px 40px rgba(56,59,62,.28);transform:translate(-50%,-85%);pointer-events:none;font-size:11px;color:#3e4144}
body.arranging-layout{cursor:grabbing;user-select:none;-webkit-user-select:none}
#dashboard[data-view=music][data-media-mode=split] .map-search{flex-wrap:wrap}
#dashboard[data-view=music][data-media-mode=split] .map-search input{flex-basis:100%}
#dashboard[data-view=music][data-media-mode=split] .map-search button{flex:1}
#dashboard[data-view=music][data-media-mode=split] .map-results{top:110px;bottom:auto}
#dashboard[data-view=music][data-media-mode=split] .map-header{left:10px;top:auto;bottom:56px;transform:none}
#dashboard[data-view=music][data-media-mode=split] .map-recenter{top:auto;bottom:56px}
#dashboard[data-view=music][data-media-mode=split] .map-switch button{padding-inline:7px}
#dashboard[data-view=music][data-media-mode=split] .map-orientation{top:auto;bottom:10px}
@media(max-width:640px),(pointer:coarse){
  #dashboard .map-search input{font-size:16px}
}
@media(max-width:640px){
  .layout-drop-zones{grid-template-columns:1fr;grid-template-rows:1fr 1fr}
  #dashboard .top-actions{gap:4px}
  #dashboard .clock{display:none}
  #dashboard .layout-controls{padding-right:3px;gap:2px}
  #dashboard .layout-button{width:30px}
  #dashboard[data-view=calendar] #calendar-card,#dashboard[data-view=reminders] #reminders-card{min-height:44vh;min-height:44dvh}
  #dashboard[data-view=calendar][data-personal-mode=split] #reminders-card,#dashboard[data-view=reminders][data-personal-mode=split] #calendar-card{min-height:156px}
  #dashboard:is([data-view=calendar],[data-view=reminders]) .music-card{min-height:38vh;min-height:38dvh}
  #dashboard .info-card .ios-list{max-height:60vh;max-height:60dvh}
  #dashboard[data-view=calendar][data-personal-mode=solo] #calendar-card,#dashboard[data-view=reminders][data-personal-mode=solo] #reminders-card{min-height:75vh;min-height:75dvh}
}

/* Janela flutuante: tudo empilhado, sem vistas. */
body.picture-in-picture #dashboard .workspace{display:flex;flex-direction:column}
body.picture-in-picture #dashboard[data-view] :is(#map-card,#calendar-card,#reminders-card){display:block}
body.picture-in-picture #dashboard[data-view] .car-card{display:grid}

/* API da Tesla em Ligações: os botões dobram de linha no ecrã estreito do iPhone. */
.tesla-actions{flex-wrap:wrap;margin-top:10px}.tesla-actions>*{flex:1 1 auto}#tesla-api-setup[hidden]{display:none}.tesla-api .automation-steps strong{display:inline}
.tesla-key{width:100%;margin-top:4px;border:0;border-radius:9px;padding:8px 10px;background:rgba(255,255,255,.85);font:9px/1.35 ui-monospace,Menlo,monospace;color:#3e4245;resize:none}

/* Todos os cartões partilham o mesmo espaço; as posições são guardadas pelo painel. */
#dashboard[data-layout=unified] .workspace{display:block;position:relative;min-width:0;min-height:0;transition:none}
#dashboard[data-layout=unified] .workspace>[data-panel]:not([hidden]){position:absolute;display:block!important;min-width:0;min-height:0!important;margin:0;grid-area:auto;box-sizing:border-box}
#dashboard[data-layout=unified] .workspace>[data-panel][hidden]{display:none!important}
#dashboard[data-layout=unified] .workspace>[data-panel].is-dragging{opacity:.55}
.layout-resize-handle{position:absolute;z-index:15;display:grid;place-items:center;border:0;touch-action:none;user-select:none;-webkit-user-select:none}
.layout-resize-handle[data-axis=x]{transform:translateX(-50%);cursor:col-resize}
.layout-resize-handle[data-axis=y]{transform:translateY(-50%);cursor:row-resize}
.layout-resize-handle::after{content:"";display:block;border-radius:99px;background:rgba(105,111,116,.4);box-shadow:0 1px 4px rgba(255,255,255,.8);transition:background .16s,transform .16s}
.layout-resize-handle[data-axis=x]::after{width:5px;height:58px}
.layout-resize-handle[data-axis=y]::after{width:46px;height:4px}
.layout-resize-handle:hover::after,.layout-resize-handle.is-resizing::after,.layout-resize-handle:focus-visible::after{background:#e31837;transform:scale(1.12)}
.layout-resize-handle:focus-visible{outline:2px solid #e31837;outline-offset:-2px;border-radius:8px}
body.resizing-layout{cursor:col-resize;user-select:none}
body.resizing-layout:has(.layout-resize-handle[data-axis=y].is-resizing){cursor:row-resize}
@media(max-width:640px){
  #dashboard[data-layout=unified][data-mobile-resize=true] .workspace>[data-panel]:not([hidden]){height:var(--mobile-panel-height)!important;min-height:0!important}
  #dashboard[data-layout=unified][data-mobile-resize=true] .workspace>.music-card:not([hidden]){justify-content:flex-start!important;gap:10px;padding:30px 18px 16px;overflow:auto}
  #dashboard[data-layout=unified][data-mobile-resize=true] .music-card .big-art{width:min(40vw,160px)!important}
  #dashboard[data-layout=unified][data-mobile-resize=true] .music-card .music-controls{margin-top:8px}
  #dashboard[data-layout=unified][data-mobile-resize=true] .workspace>.layout-resize-handle{transform:translateY(-50%)}
}

/* A pega move o cartão sem interferir com o mapa, listas ou rotação do veículo. */
#dashboard[data-layout=unified] .card-arrange{position:absolute;z-index:9;top:12px;right:12px;display:grid;place-items:center;width:30px;height:30px;padding:6px;border:1px solid rgba(111,117,123,.2);border-radius:10px;background:rgba(251,252,252,.84);box-shadow:0 3px 10px rgba(66,69,72,.1);color:#6d7379;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
#dashboard[data-layout=unified] .card-arrange:hover{background:#fff;color:#e31837}
#dashboard[data-layout=unified] .card-arrange:active{cursor:grabbing}
#dashboard[data-layout=unified] .card-arrange:focus-visible{outline:2px solid #e31837;outline-offset:3px;background:#fff}
#dashboard[data-layout=unified] .card-arrange svg{display:block;width:100%;height:100%;fill:currentColor}
#dashboard[data-layout=unified] [data-panel=vehicle]>.card-arrange{right:50%;transform:translateX(50%)}
#dashboard .dock-item[data-view]{touch-action:none;user-select:none;-webkit-user-select:none}
#dashboard .dock-item[data-view] img{pointer-events:none;-webkit-user-drag:none}

/* As listas usam toda a altura disponível e mantêm os eventos acessíveis por scroll. */
#dashboard[data-layout=unified] .workspace>.info-card:not([hidden]){display:flex!important;flex-direction:column;padding:17px 20px;overflow:hidden}
#dashboard[data-layout=unified] .info-card .card-topline{flex:none;min-width:0;padding-right:32px;gap:8px}
#dashboard[data-layout=unified] .info-card .section-title{min-width:0;gap:8px}
#dashboard[data-layout=unified] .info-card .section-title h2{font-size:clamp(16px,1.6vw,22px)}
#dashboard[data-layout=unified] .info-card .service-state{min-width:0}
#dashboard[data-layout=unified] .info-card .service-state small{max-width:100%;white-space:normal;text-align:right}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .card-topline{align-items:center;flex-direction:row;gap:6px}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .section-title{max-width:calc(100% - 30px)}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .section-title h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .calendar-refresh{width:22px;height:22px}
#dashboard[data-layout=unified] :is(#calendar-card,#reminders-card) .card-topline{padding-right:0}
#dashboard[data-layout=unified] :is(#calendar-card,#reminders-card) .section-title{flex:1}
#dashboard[data-layout=unified] .info-card .ios-list{flex:1;min-height:0;max-height:none!important;margin-top:12px;overflow:auto;overscroll-behavior:contain}
#dashboard[data-layout=unified] .info-card .ios-calendar-row,#dashboard[data-layout=unified] .info-card .ios-reminder-row{display:grid!important;min-height:60px;padding:8px 10px}
#dashboard[data-layout=unified] .info-card .ios-list-footer{height:27px}
#dashboard[data-layout=unified] .info-card[data-compact=true]{padding:13px 16px}
#dashboard[data-layout=unified] .info-card[data-compact=true] .card-topline{padding-right:34px}
#dashboard[data-layout=unified] .info-card[data-compact=true] .sprite-icon{width:36px;height:36px}
#dashboard[data-layout=unified] .info-card[data-compact=true] .ios-list{margin-top:8px}
#dashboard[data-layout=unified] .info-card[data-compact=true] .ios-calendar-row,#dashboard[data-layout=unified] .info-card[data-compact=true] .ios-reminder-row{min-height:54px;padding-block:6px}

/* O veículo conserva a apresentação completa mesmo numa metade do ecrã. */
#dashboard[data-layout=unified] .workspace>.car-card:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(82px,1fr) auto;padding:17px 20px 14px;border-radius:30px;overflow:hidden;background:linear-gradient(150deg,rgba(249,249,249,.7),rgba(239,239,240,.43));box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 36px rgba(72,76,79,.13)}
#dashboard[data-layout=unified] .car-heading{grid-column:1;min-width:0;position:relative;z-index:4}
#dashboard[data-layout=unified] .car-heading h2{font-size:clamp(18px,2vw,24px)}
#dashboard[data-layout=unified] .car-visual{grid-column:1;height:auto;min-height:0;isolation:isolate;overflow:hidden}
#dashboard[data-layout=unified] .car-visual i{z-index:0;width:64%;height:21%;bottom:13px;background:rgba(113,119,124,.18);filter:blur(17px)}
#dashboard[data-layout=unified] .car-visual model-viewer{width:100%;height:100%;max-height:none}
#dashboard[data-layout=unified] .car-visual .model3-render{position:absolute;inset:0;margin:auto;z-index:1;display:block;width:min(104%,1100px);height:100%;max-height:none;object-fit:contain;filter:drop-shadow(0 14px 14px rgba(64,67,70,.17))}
#dashboard[data-layout=unified] .car-visual .model3-render[hidden],#dashboard[data-layout=unified] .car-visual.is-ready .model3-render{display:none}
#dashboard[data-layout=unified] .car-metrics{display:grid;grid-column:1;grid-template-columns:repeat(3,minmax(0,1fr));border-left:0;border-top:1px solid rgba(255,255,255,.68);padding:10px 0 0;gap:0}
#dashboard[data-layout=unified] .car-metrics div+div{border-left:1px solid rgba(255,255,255,.65);padding-left:14px}
#dashboard[data-layout=unified] .car-metrics span{font-size:8px}
#dashboard[data-layout=unified] .car-metrics strong{font-size:15px}
#dashboard[data-layout=unified] .car-card[data-compact=true]{padding:13px 16px 11px}
#dashboard[data-layout=unified] .car-card[data-compact=true] .car-heading h2{font-size:19px}
#dashboard[data-layout=unified] .car-card[data-compact=true] .car-metrics{padding-top:8px}

/* Música em coluna; nos cartões baixos a capa e a faixa ficam lado a lado. */
#dashboard[data-layout=unified] .workspace>.music-card:not([hidden]){display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:38px 18px 18px;text-align:center;overflow:auto}
#dashboard[data-layout=unified] .music-card .big-art{width:clamp(110px,calc(100vh - 400px),340px);width:clamp(110px,calc(100dvh - 400px),340px);height:auto;max-width:100%;aspect-ratio:1;flex:none}
#dashboard[data-layout=unified] .music-card .music-title-line{justify-content:center;gap:8px;flex-wrap:wrap}
#dashboard[data-layout=unified] .music-card #music-title{font-size:clamp(20px,2.1vw,28px);-webkit-line-clamp:2}
#dashboard[data-layout=unified] .music-card .music-artist{font-size:16px}
#dashboard[data-layout=unified] .music-card .music-album{font-size:12px}
#dashboard[data-layout=unified] .workspace>.music-card[data-compact=true]:not([hidden]){display:grid!important;grid-template-columns:minmax(76px,.36fr) minmax(0,1fr);align-content:center;gap:16px;padding:35px 18px 16px;text-align:left}
#dashboard[data-layout=unified] .music-card[data-compact=true] .big-art{width:100%;max-width:132px;justify-self:center}
#dashboard[data-layout=unified] .music-card[data-compact=true] .track-info{min-width:0}
#dashboard[data-layout=unified] .music-card[data-compact=true] .music-title-line{justify-content:flex-start;gap:5px}
#dashboard[data-layout=unified] .music-card[data-compact=true] #music-title{font-size:19px}
#dashboard[data-layout=unified] .music-card[data-compact=true] .music-artist{font-size:13px}
#dashboard[data-layout=unified][data-layout-mode=solo] .workspace>.music-card:not([hidden]){flex-direction:row;gap:36px;padding:35px 42px;text-align:left}
#dashboard[data-layout=unified][data-layout-mode=solo] .music-card .big-art{width:clamp(200px,calc(100vh - 220px),480px);width:clamp(200px,calc(100dvh - 220px),480px);max-width:48%}
#dashboard[data-layout=unified][data-layout-mode=solo] .music-card .music-title-line{justify-content:flex-start}
#dashboard[data-layout=unified][data-layout-mode=solo] .music-card #music-title{font-size:clamp(28px,3.6vw,50px)}

/* Pesquisa e pega do mapa continuam acessíveis em colunas estreitas. */
#dashboard[data-layout=unified] #map-card .map-search,#dashboard[data-layout=unified] #map-card .map-results{width:min(540px,calc(100% - 64px))}
#dashboard[data-layout=unified] #map-card .map-search{flex-wrap:wrap}
#dashboard[data-layout=unified] #map-card .map-search input{flex:1 1 160px;width:auto}
#dashboard[data-layout=unified] #map-card .map-search button{flex:1 1 auto}
#dashboard[data-layout=unified] #map-card .map-results{top:110px;max-height:calc(100% - 190px)}
#dashboard[data-layout=unified] #map-card[data-compact=true] .route-summary{bottom:100px;max-height:calc(100% - 220px);overflow:auto}

/* O alvo do arrasto oferece inserção em cada margem e troca ao centro. */
#dashboard[data-layout=unified] #layout-drop-zones{position:absolute;inset:auto;z-index:12;display:grid;grid-template-columns:25fr 50fr 25fr;grid-template-rows:25fr 50fr 25fr;grid-template-areas:"top top top" "left center right" "bottom bottom bottom";gap:6px;padding:4px;pointer-events:none}
#dashboard[data-layout=unified] #layout-drop-zones>[data-side=top]{grid-area:top}
#dashboard[data-layout=unified] #layout-drop-zones>[data-side=left]{grid-area:left}
#dashboard[data-layout=unified] #layout-drop-zones>[data-side=center]{grid-area:center}
#dashboard[data-layout=unified] #layout-drop-zones>[data-side=right]{grid-area:right}
#dashboard[data-layout=unified] #layout-drop-zones>[data-side=bottom]{grid-area:bottom}
#dashboard[data-layout=unified] #layout-drop-zones>div{min-width:0;min-height:0;border-radius:18px;overflow:hidden;background:rgba(71,75,79,.22)}
#dashboard[data-layout=unified] #layout-drop-zones>div.is-target{background:rgba(227,24,55,.36)}
#dashboard[data-layout=unified] #layout-drop-zones span{max-width:100%;padding:8px 12px;border-radius:12px;font-size:clamp(10px,1.1vw,14px);line-height:1.2;text-align:center}
.dock-drag-preview{max-width:220px;font-size:13px;font-weight:650;white-space:nowrap}

/* Alternativa ao arrasto, também utilizável com teclado. */
#dashboard .layout-position-panel{position:fixed;z-index:16;top:58px;right:22px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;width:min(300px,calc(100vw - 28px));max-height:calc(100vh - 86px);max-height:calc(100dvh - 86px);overflow:auto;padding:16px;border-radius:20px;background:rgba(248,249,249,.97);box-shadow:0 16px 38px rgba(66,69,72,.24);color:#3d4043}
#dashboard .layout-position-panel[hidden]{display:none}
#dashboard #layout-position-title{align-self:center;min-width:0;font-size:14px;line-height:1.3}
#dashboard #layout-position-close{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:9px;background:rgba(111,117,123,.1);color:#72787e;font:inherit;font-size:22px;line-height:1;cursor:pointer}
#dashboard #layout-position-close:hover{background:rgba(111,117,123,.2);color:#3e4245}
#dashboard .layout-position-panel label{grid-column:1/-1;margin-top:3px;font-size:11px;font-weight:700;color:#60656a}
#dashboard .layout-position-panel select{grid-column:1/-1;width:100%;min-height:40px;padding:9px 10px;border:1px solid #d4d7d9;border-radius:10px;background:#fff;color:#34373a;font:inherit;font-size:13px}
#dashboard #layout-position-apply{grid-column:1/-1;width:100%;margin-top:4px;font-size:12px}
#dashboard .layout-position-panel :is(button,select):focus-visible{outline:2px solid #e31837;outline-offset:2px}

@media(max-width:640px){
  #dashboard .layout-position-panel{right:14px}
  #dashboard .layout-position-panel select{font-size:16px}
  #dashboard[data-layout=unified] .workspace{display:flex!important;flex-direction:column;gap:8px;flex:none}
  #dashboard[data-layout=unified] .workspace>[data-panel]:not([hidden]){position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:auto!important;flex:none}
  #dashboard[data-layout=unified] .workspace>[data-panel=map]:not([hidden]){min-height:55vh!important;min-height:55dvh!important}
  #dashboard[data-layout=unified] .workspace>[data-panel=music]:not([hidden]){display:flex!important;flex-direction:column!important;min-height:38vh!important;min-height:38dvh!important;gap:14px;padding:40px 18px 20px;text-align:center}
  #dashboard[data-layout=unified] .workspace>[data-panel=calendar]:not([hidden]),#dashboard[data-layout=unified] .workspace>[data-panel=reminders]:not([hidden]){min-height:260px!important}
  #dashboard[data-layout=unified] .workspace>[data-panel=vehicle]:not([hidden]){min-height:360px!important;grid-template-rows:auto minmax(220px,1fr) auto}
  #dashboard[data-layout=unified] .music-card .big-art,#dashboard[data-layout=unified][data-layout-mode=solo] .music-card .big-art{width:min(52vw,210px);max-width:100%}
  #dashboard[data-layout=unified] .music-card .music-title-line,#dashboard[data-layout=unified][data-layout-mode=solo] .music-card .music-title-line{justify-content:center}
  #dashboard[data-layout=unified] .music-card #music-title,#dashboard[data-layout=unified][data-layout-mode=solo] .music-card #music-title{font-size:23px}
  #dashboard[data-layout=unified] .info-card .ios-list{flex:none;max-height:360px!important}
  #dashboard[data-layout=unified] .info-card .card-topline{gap:6px}
  #dashboard[data-layout=unified] .info-card .section-title h2{font-size:17px}
}

/* A janela flutuante conserva a ordem e as mesmas caixas da composição escolhida. */
body.picture-in-picture #dashboard[data-layout=unified] .workspace{display:flex!important;flex-direction:column;gap:8px;flex:none}
body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel]:not([hidden]){position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:auto!important;flex:none}
body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel=map]:not([hidden]){min-height:55vh!important;min-height:55dvh!important}
body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel=music]:not([hidden]){display:flex!important;flex-direction:column!important;min-height:38vh!important;min-height:38dvh!important;gap:14px;padding:40px 18px 20px;text-align:center}
body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel=calendar]:not([hidden]),body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel=reminders]:not([hidden]){min-height:260px!important}
body.picture-in-picture #dashboard[data-layout=unified] .workspace>[data-panel=vehicle]:not([hidden]){min-height:360px!important;grid-template-rows:auto minmax(220px,1fr) auto}
body.picture-in-picture #dashboard[data-layout=unified] .music-card .big-art{width:min(52vw,210px);max-width:100%}
body.picture-in-picture #dashboard[data-layout=unified] .music-card .music-title-line{justify-content:center}
body.picture-in-picture #dashboard[data-layout=unified] .music-card #music-title{font-size:23px}
body.picture-in-picture #dashboard[data-layout=unified] .info-card .ios-list{flex:none;max-height:360px!important}

/* O zoom fica no canto superior direito do mapa, fora da barra de pesquisa. */
.map-zoom{position:absolute;z-index:5;top:10px;right:10px;display:flex;gap:5px;flex:none;padding:5px;border-radius:16px}
.map-zoom button{width:44px;height:44px;border:0;border-radius:12px;background:rgba(255,255,255,.86);color:#e31837;font-size:26px;font-weight:600;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(50,54,56,.14)}
.map-zoom button:active{background:#ededee}
#dashboard .map-search{width:min(640px,calc(100% - 20px))}
#dashboard .map-search input{height:44px}
#dashboard .map-search .primary-button,#dashboard .map-search .secondary-button{height:44px}
#dashboard .map-results{width:min(640px,calc(100% - 20px));top:72px}

/* --- Balões de manobra, canto superior esquerdo --- */
.maneuver-balloons{position:absolute;z-index:4;left:12px;top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:min(430px,calc(100% - 132px));pointer-events:none}
.maneuver-balloons.is-floating{position:fixed;z-index:25;left:max(12px,env(safe-area-inset-left));top:max(12px,env(safe-area-inset-top));max-width:min(430px,calc(100% - 24px))}
.maneuver-balloons.is-floating .maneuver-balloon[data-level="0"]{font-size:16px;padding:8px 14px 8px 8px}
@media(min-width:481px){#dashboard[data-dock-position=left]>.maneuver-balloons.is-floating{left:max(92px,env(safe-area-inset-left));max-width:min(430px,calc(100% - 104px))}}
.maneuver-balloons[hidden],#map-card.route-search-editing .maneuver-balloons{display:none}
:root{--navigation-blue:#33ccff;--navigation-ink:#09354a;--navigation-pale:#e9f9ff}
.maneuver-balloon{display:flex;align-items:center;gap:10px;padding:8px 16px 8px 9px;border-radius:999px;background:var(--navigation-pale);border:1px solid rgba(255,255,255,.9);box-shadow:0 8px 22px rgba(16,54,74,.22);color:var(--navigation-ink);transform-origin:left top;transition:transform .35s ease,opacity .35s ease,font-size .35s ease,padding .35s ease}
.maneuver-balloon[data-level="0"]{background:var(--navigation-blue);color:var(--navigation-ink);border-color:var(--navigation-blue);padding:10px 20px 10px 10px;font-size:20px}
#dashboard #map-card[data-wide=false] .maneuver-balloons .maneuver-balloon[data-level="0"]{font-size:16px;padding:8px 14px 8px 8px}
.maneuver-balloon[data-level="1"]{font-size:15px;opacity:.94}
.maneuver-balloon[data-level="2"]{font-size:13px;opacity:.82}
.maneuver-balloon.is-entering{opacity:0;transform:translateY(-14px) scale(.88)}
.maneuver-balloon.is-leaving{opacity:0;transform:translateX(-36px) scale(.9);transition-duration:.3s}
.maneuver-icon{flex:none;width:2.1em;height:2.1em;display:grid;place-items:center;border-radius:50%;background:rgba(51,204,255,.24)}
.maneuver-balloon[data-level="0"] .maneuver-icon{background:rgba(255,255,255,.48)}
.maneuver-icon svg{width:1.4em;height:1.4em;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .35s ease}
.maneuver-copy{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.maneuver-copy strong{font-weight:750;white-space:normal;overflow:hidden;text-overflow:ellipsis}
.maneuver-copy small{font-size:.62em;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.maneuver-copy small:empty{display:none}
#dashboard .route-summary{left:auto;right:10px;bottom:56px;width:auto;grid-template-columns:auto;padding:6px 12px}
@media (prefers-reduced-motion:reduce){.maneuver-balloon,.maneuver-icon svg{transition:none}}
.map-frame{isolation:isolate;z-index:0}
.maneuver-balloon{max-width:100%;min-width:0;box-sizing:border-box}.maneuver-balloon[data-level="0"]{max-width:100%}

/* Foto anterior do Model 3 (do primeiro commit): só aparece se o modelo 3D falhar. */
.car-photo-fallback{display:none;position:absolute;inset:0;margin:auto;width:min(92%,900px);height:100%;object-fit:contain;z-index:1;pointer-events:none}
.car-turntable.has-error .car-photo-fallback{display:block}
.car-turntable.has-error #car-loading{position:absolute;bottom:4px;left:0;right:0;z-index:2}

/* --- Cartão de música: fonte centrada, capa grande à esquerda ao lado do mapa, controlos em ecrã inteiro --- */
#dashboard[data-layout=unified] .music-card .music-title-line{justify-content:center!important}
.music-source-name{font-size:14px;padding:7px 16px}
.music-controls,.music-control-note{display:none}
.music-control{width:76px;height:76px;border:0;border-radius:50%;background:rgba(255,255,255,.78);color:#252728;cursor:pointer;box-shadow:0 6px 16px rgba(59,63,66,.18);display:grid;place-items:center;padding:0}
.music-control:active{background:#ededee}
.music-control svg{width:34px;height:34px;fill:currentColor;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.music-control-main{width:96px;height:96px;background:#e31837;color:#fff}
.music-control-main:active{background:#e31837}
#dashboard[data-layout-mode=solo] .music-controls{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:22px}
#dashboard[data-layout-mode=solo] .music-control-note{display:block;text-align:center;min-height:1.2em;margin-top:10px;font-size:13px;color:#585d61}
#dashboard[data-layout=unified] .workspace>.music-card[data-wide=true]:not([data-compact=true]):not([hidden]):not([data-solo]){flex-direction:row;align-items:center;gap:28px;padding:38px 26px 22px;text-align:left}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .big-art{width:clamp(200px,52%,460px);max-width:52%;flex:none;aspect-ratio:1;height:auto}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .track-info{flex:1;min-width:0}
#dashboard[data-layout=unified] .music-card[data-compact=true] .big-art{max-width:200px}

/* Lembretes concluíveis e evento a partir do destino */
button.ios-reminder-ring{padding:0;cursor:pointer;background:transparent;position:relative;flex:none}
button.ios-reminder-ring::after{content:"";position:absolute;inset:-12px}
.ios-reminder-row.is-done strong{text-decoration:line-through;opacity:.5}
.ios-reminder-row.is-done .ios-reminder-ring{background:#34c759;border-color:#34c759}
.calendar-add-toggle{width:100%;height:46px;margin-top:8px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-add-form{display:flex;gap:8px;align-items:center;margin-top:8px}
.calendar-add-form[hidden]{display:none}
.calendar-add-form input{height:44px;border:0;border-radius:12px;padding:0 10px;font-size:14px}
.calendar-add-form .primary-button{height:44px;flex:1}

/* --- Menu de aplicações (engrenagem na barra superior) --- */
.apps-menu-button{font-size:20px}
.apps-menu{position:fixed;z-index:60;top:72px;right:20px;width:min(560px,calc(100vw - 40px));max-height:calc(100vh - 160px);overflow:auto;border-radius:24px;padding:16px 18px 18px;box-shadow:0 22px 60px rgba(48,51,54,.35);background:rgba(250,250,251,.94);color:#252728}
.apps-menu[hidden]{display:none}
.apps-menu-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.apps-menu-heading .round-button{background:rgba(227,24,55,.12);color:#e31837;border-color:rgba(227,24,55,.25)}
.apps-menu h3{margin:14px 0 8px;font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:#5b6065}
.apps-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}
.app-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:96px;padding:10px 6px;border:0;border-radius:18px;background:rgba(255,255,255,.8);color:#252728;font:inherit;text-align:center;text-decoration:none;cursor:pointer;box-shadow:0 3px 10px rgba(59,63,66,.1)}
.app-tile:active{background:#ededee}
.app-tile-icon{font-size:30px;line-height:1}
.app-tile strong{font-size:13px}
.app-tile small{font-size:10px;color:#6a7075;line-height:1.2}

/* --- Mail --- */
.mail-tabs{display:flex;gap:8px;margin:12px 0 6px;position:relative;z-index:1}
.mail-tabs button{flex:1;height:46px;border:0;border-radius:14px;background:rgba(255,255,255,.55);color:#4b4f52;font:inherit;font-weight:700;font-size:14px;cursor:pointer}
.mail-tabs button[aria-selected=true]{background:#fff;color:#e31837;box-shadow:0 2px 8px rgba(50,54,56,.12)}
.mail-tabs b{display:inline-block;min-width:20px;padding:1px 6px;margin-left:4px;border-radius:99px;background:#e5484d;color:#fff;font-size:11px}
.mail-list{flex:1;min-height:0;overflow:auto;position:relative;z-index:1}
.mail-row{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:58px;padding:6px 4px;border-bottom:1px solid rgba(255,255,255,.7)}
.mail-row .ios-row-copy strong{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mail-row .ios-row-copy small{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#6a7075}
.mail-row.is-unread .ios-row-copy strong{font-weight:800}
.mail-row time{font-size:11px;color:#6a7075}
.mail-dot{width:9px;height:9px;border-radius:50%;background:transparent}
.mail-row.is-unread .mail-dot{background:#e31837}
.mail-empty{margin:18px 6px;font-size:13px;color:#585d61}
.mail-empty.is-error{color:#9a3412}
.mail-source{margin:8px 4px 0;font-size:11px;color:#6a7075}
.gmail-form{position:relative;z-index:1;margin-top:8px;padding:12px;border-radius:16px;background:rgba(255,255,255,.6)}
.gmail-form[hidden]{display:none}
.gmail-form p{margin:0 0 8px;font-size:12px;line-height:1.45;color:#3f4346}
.gmail-form label{display:block;font-size:12px;font-weight:700;margin:8px 0 4px}
.gmail-form input{width:100%;height:46px;border:0;border-radius:12px;padding:0 12px;font-size:15px;background:#fff}
.gmail-form .primary-button{width:100%;height:46px;margin-top:10px}
.gmail-form small{display:block;margin-top:6px;font-size:12px;color:#3f4346}


/* --- WhatsApp --- */
.whatsapp-note{position:relative;z-index:1;margin-top:16px;padding:16px;border-radius:18px;background:rgba(255,255,255,.62);font-size:14px;line-height:1.5;color:#303335}
.whatsapp-note p{margin:8px 0 14px}
.whatsapp-open-link{display:inline-flex;align-items:center;height:48px;text-decoration:none}
.whatsapp-items{display:grid;gap:8px;max-height:42vh;overflow:auto}.whatsapp-message{padding:11px 12px;border:1px solid rgba(255,255,255,.68);border-radius:14px;background:rgba(255,255,255,.5)}.whatsapp-message strong{font-size:12px}.whatsapp-message time{float:right;color:#6a7075;font-size:10px}.whatsapp-message p{margin:7px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.whatsapp-empty{color:#666;font-size:12px}.whatsapp-panel-actions{display:flex;align-items:center;gap:10px;margin-top:12px}.whatsapp-panel-actions .secondary-button{min-height:44px;padding:0 12px}.phone-card textarea{display:block;width:100%;padding:10px 12px;border:1px solid #ffffffb3;border-radius:12px;background:#ffffffb3;margin-bottom:12px;font:inherit;font-size:14px;resize:vertical}
#dashboard .apps-menu-button{width:44px;height:44px}

/* Sem as pegas «organizar» nas caixas: a organização faz-se arrastando os ícones do dock. */
.card-arrange,#dashboard[data-layout=unified] .card-arrange{display:none!important}
.map-reset{flex:none;color:#b3261e}

/* Os botões ficavam por baixo do brilho decorativo do cartão e não recebiam toques. */
.music-card::after{pointer-events:none}
.music-controls,.music-control{position:relative;z-index:2}
.music-control-main{background:rgba(227,24,55,.2);color:#e31837;border:1px solid rgba(255,255,255,.75);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);box-shadow:0 8px 22px rgba(227,24,55,.22),inset 0 1px rgba(255,255,255,.8)}
.music-control-main:active{background:rgba(227,24,55,.34)}
.music-control{backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);background:rgba(255,255,255,.5);border:1px solid rgba(255,255,255,.75)}

/* Barra de progresso da faixa */
.music-progress{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;margin:14px 0 4px;width:100%;position:relative;z-index:2}
.music-progress[hidden]{display:none}
.music-progress time{font-size:12px;font-variant-numeric:tabular-nums;color:#585d61;min-width:3.2em}
.music-progress time:last-child{text-align:right}
.music-progress-track{height:8px;border-radius:99px;background:rgba(255,255,255,.65);box-shadow:inset 0 1px 3px rgba(59,63,66,.18);overflow:hidden}
.music-progress-track i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,rgba(227,24,55,.85),rgba(238,101,62,.85));transition:width .5s linear}

/* --- Leitor de música com botões em todos os tamanhos ---
   Os botões deixaram de ser só do ecrã inteiro: o leitor pequeno, ao lado do mapa, também os tem.
   A capa encolhe pelo tamanho real da caixa (--card-w e --card-h, postos por app.js) para os
   botões caberem sempre sem ser preciso deslocar o cartão. */
#dashboard .music-card{--ctl:58px;--ctl-main:72px;--ctl-gap:16px}
#dashboard[data-layout-mode=solo] .music-card{--ctl:76px;--ctl-main:96px;--ctl-gap:22px}
#dashboard .music-card[data-wide=true]:not([data-compact=true]){--ctl:64px;--ctl-main:80px;--ctl-gap:18px}
#dashboard .music-card[data-compact=true]{--ctl:50px;--ctl-main:60px;--ctl-gap:12px}
#dashboard .music-controls{display:flex;align-items:center;justify-content:center;gap:var(--ctl-gap);margin-top:14px}
#dashboard[data-layout-mode=solo] .music-controls{margin-top:22px}
#dashboard .music-control{width:var(--ctl);height:var(--ctl);flex:none}
#dashboard .music-control-main{width:var(--ctl-main);height:var(--ctl-main)}
#dashboard .music-control svg{width:calc(var(--ctl) * .46);height:calc(var(--ctl) * .46)}
#dashboard .music-control-main svg{width:calc(var(--ctl-main) * .38);height:calc(var(--ctl-main) * .38)}
#dashboard .music-control-note{display:block;min-height:1.3em;margin-top:8px;font-size:12px;line-height:1.3;color:#585d61;text-align:center}
#dashboard[data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .music-controls{justify-content:flex-start}
#dashboard[data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .music-control-note{text-align:left}
#dashboard .music-card[data-compact=true] .music-controls{justify-content:flex-start;margin-top:8px}
#dashboard .music-card[data-compact=true] .music-control-note{display:none}
@media(min-width:641px){
  /* Leitor estreito (capa por cima): a capa cede a altura que os textos e os botões precisam. */
  body:not(.picture-in-picture) #dashboard[data-layout=unified][data-layout-mode=split] .music-card:not([data-wide=true]):not([data-compact=true]) .big-art{width:clamp(96px,min(calc(var(--card-w,420px) - 52px),calc(var(--card-h,700px) - 360px)),460px)}
  /* Leitor largo (capa à esquerda): a capa nunca passa a altura da caixa. */
  body:not(.picture-in-picture) #dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .big-art{width:clamp(160px,min(46%,calc(var(--card-h,700px) - 90px)),520px)}
}
/* Mapa pequeno, ao lado da música em destaque: pesquisa e ações em linhas separadas. */
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-search input{flex:1 1 55%}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-search>button{flex:1 1 28%;min-width:0;padding-inline:6px}
@media(max-width:640px){
  #dashboard .map-search{width:min(540px,calc(100% - 76px))}
}

/* A pesquisa e o zoom partilham uma grelha responsiva: o zoom reserva sempre a sua coluna. */
#dashboard .map-top-controls{position:absolute;z-index:5;top:10px;left:10px;right:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"search zoom" "results .";align-items:start;gap:8px 12px;pointer-events:none}
#dashboard .map-top-controls>.map-search{position:relative;inset:auto;grid-area:search;width:100%;max-width:640px;min-width:0;margin:0;display:flex;flex-wrap:wrap;pointer-events:auto}
#dashboard .map-top-controls>.map-search input{flex:1 1 160px;width:auto;min-width:0}
#dashboard .map-top-controls>.map-search>button{flex:1 1 auto;min-width:0}
#dashboard .map-top-controls>.map-search>.map-reset-compact{flex:0 0 38px;width:38px;min-width:38px;padding:0;border-radius:12px;font-size:22px;line-height:1;font-weight:500}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search.map-search-route-ready{flex-wrap:nowrap;gap:6px}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search.map-search-route-ready input{flex:1 1 0;min-width:0}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search.map-search-route-ready #search-waze{flex:0 0 auto;padding-inline:12px}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search.map-search-route-ready>.map-reset-compact{flex:0 0 44px;width:44px;min-width:44px;height:44px;padding:0;border:1px solid rgba(227,24,55,.2);border-radius:13px;background:rgba(255,255,255,.92);color:#e31837;font-size:24px;line-height:1;box-shadow:0 3px 10px rgba(49,52,55,.14)}
#dashboard .map-top-controls>.map-zoom{position:relative;grid-area:zoom;top:auto;right:auto;left:auto;bottom:auto;justify-self:end;pointer-events:auto}
#dashboard .map-top-controls>.map-results{position:relative;grid-area:results;inset:auto;width:100%;max-width:640px;min-width:0;max-height:min(52vh,420px);overflow:auto;pointer-events:auto}
#dashboard[data-layout=unified] #map-card .route-summary{top:68px;right:10px;bottom:auto;left:auto;width:auto;max-width:min(240px,calc(100% - 20px));padding:6px 10px;border-radius:12px;box-shadow:0 5px 14px rgba(30,33,36,.18);pointer-events:none}
#dashboard[data-layout=unified] #map-card .route-summary strong{display:block;max-width:100%;font-size:14px;line-height:1.2;font-variant-numeric:tabular-nums;white-space:normal}
#dashboard .map-card.has-planned-route:not(.route-search-editing) .map-top-controls>.map-search,
#dashboard .map-card.has-planned-route:not(.route-search-editing) .map-top-controls>.map-results{display:none!important}
#dashboard .route-actions{position:absolute;z-index:20;inset:0;display:grid;place-items:center;padding:18px}
#dashboard .route-actions[hidden]{display:none}
#dashboard .route-actions-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(22,25,28,.28);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
#dashboard .route-actions-panel{position:relative;z-index:1;width:min(360px,100%);padding:24px;border:1px solid rgba(255,255,255,.82);border-radius:24px;background:rgba(250,250,251,.96);box-shadow:0 20px 55px rgba(12,15,18,.3);color:#25282b}
#dashboard .route-actions-panel h2{margin:5px 44px 5px 0;font-size:22px;line-height:1.1;letter-spacing:-.3px}
#dashboard .route-actions-panel p{margin:0 36px 14px 0;font-size:16px;line-height:1.35;font-weight:650;overflow-wrap:anywhere}
#dashboard .route-actions-close{position:absolute;top:10px;right:10px;width:44px;height:44px;border:0;border-radius:14px;background:rgba(255,255,255,.8);color:#44494d;font-family:inherit;font-size:28px;font-weight:400;line-height:1;cursor:pointer}
#dashboard .route-actions-panel>#route-actions-edit,
#dashboard .route-actions-panel>#route-actions-cancel{display:block;width:100%;min-height:48px;margin-top:9px;font-size:14px}
#dashboard .route-actions-panel>#route-actions-edit{border:1px solid rgba(75,80,84,.2);border-radius:13px;background:rgba(235,237,239,.9);color:#34383b;font-weight:700}
:root[data-theme=dark] #dashboard .route-actions-panel{border-color:rgba(255,255,255,.14);background:rgba(37,39,42,.97);color:#f5f5f6}
:root[data-theme=dark] #dashboard .route-actions-close,:root[data-theme=dark] #dashboard .route-actions-panel>#route-actions-edit{border-color:rgba(255,255,255,.14);background:rgba(65,67,70,.9);color:#f1f1f2}
#dashboard[data-layout=unified] #map-card .map-top-controls>.map-search,#dashboard[data-layout=unified] #map-card .map-top-controls>.map-results{width:100%;max-width:540px}
#dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search{width:100%;max-width:380px}

/* Ícones independentes: cada logótipo acompanha o tamanho do botão ao redimensionar. */
#dashboard .sprite-icon{display:grid;place-items:center;flex:none;aspect-ratio:1;overflow:hidden}
#dashboard .sprite-icon img{position:static;display:block;width:100%;height:100%;max-width:100%;object-fit:cover;transform:none!important}
#dashboard .dock .sprite-icon{zoom:1;width:40px;height:40px;border-radius:12px}
#dashboard .dock-item{flex:none;min-width:0}
#dashboard .dock-item .sprite-icon,#dashboard .dock-item .whatsapp-logo,#dashboard .tesla-dock-mark{box-shadow:0 6px 14px rgba(49,52,55,.23),inset 0 1px rgba(255,255,255,.26)}
#dashboard .tesla-dock-mark{width:40px;height:40px;flex:none;padding:5px;border-radius:12px}
#dashboard .tesla-dock-mark svg{display:block;width:100%;height:100%;fill:#fff}
#dashboard .footer-bar{min-width:0}
#dashboard .dock{min-width:0;max-width:100%}
#dashboard .launchpad-button[aria-expanded=true]{background:rgba(255,255,255,.55)}
#dashboard .app-tile-icon img{display:block;width:48px;height:48px;object-fit:cover;border-radius:13px;box-shadow:0 5px 12px rgba(58,61,64,.17)}
#dashboard .apps-menu{top:auto;right:18px;bottom:80px;max-height:min(72vh,680px)}
#dashboard .apps-menu-button[aria-expanded=true]{background:rgba(255,255,255,.45)}
@media(max-width:720px){
  #dashboard .dock{width:100%;gap:1px}
  #dashboard .dock-item{flex:1;width:auto;font-size:clamp(7px,1.5vw,9px)}
  #dashboard .dock .sprite-icon,#dashboard .dock .whatsapp-logo,#dashboard .tesla-dock-mark{width:clamp(25px,5vw,36px);height:clamp(25px,5vw,36px)}
  #dashboard .apps-menu{right:8px;bottom:72px;width:calc(100vw - 16px);max-height:72vh}
}


/* Vetores sem margem de recorte e com o mesmo tamanho nas duas posições da agenda. */
#dashboard .sprite-calendar,#dashboard .sprite-reminders{border-radius:0;overflow:visible;box-shadow:none}
#dashboard .info-card .card-focus,#dashboard .info-card .sprite-icon{width:42px;height:42px;flex:none}
#dashboard[data-layout=unified] .info-card[data-compact=true] .sprite-icon{width:42px;height:42px}
#dashboard .info-card .card-focus{background:transparent;box-shadow:none}
#dashboard .info-card .sprite-icon{box-shadow:none}
#dashboard .dock-item .sprite-icon,#dashboard .dock-item .whatsapp-logo,#dashboard .tesla-dock-mark{box-shadow:none}
#dashboard .launchpad-button .sprite-icon{border-radius:0;overflow:visible;box-shadow:none}
#dashboard .sprite-icon img[src$=".png"]{transform:scale(1.08)!important}

/* Menu Apps em páginas horizontais, com o mesmo vidro leve do painel. */
#dashboard .apps-menu{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 90px);overflow:hidden;padding:16px;background:rgba(243,244,244,.76);border:1px solid rgba(255,255,255,.82);-webkit-backdrop-filter:blur(24px) saturate(1.25);backdrop-filter:blur(24px) saturate(1.25)}
#dashboard .apps-menu-body{overflow:hidden;touch-action:pan-y}
#dashboard .apps-pages{min-height:360px}
#dashboard .apps-page[hidden]{display:none}
#dashboard .apps-page h3{margin:11px 3px 7px}
#dashboard .apps-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#dashboard .app-tile{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;height:100px;padding:5px;border-radius:17px;background:rgba(255,255,255,.56);box-shadow:inset 0 1px rgba(255,255,255,.7),0 3px 12px rgba(63,66,69,.08);touch-action:none}
#dashboard .app-tile-open{display:flex;flex:1;min-width:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;background:none;color:#2f3234;font:inherit;text-decoration:none;cursor:pointer}
#dashboard .app-tile-open .app-tile-icon img,#dashboard .app-layout-tile .app-tile-icon img{width:36px;height:36px;border-radius:10px}
#dashboard .app-tile-open strong,#dashboard .app-layout-tile strong{max-width:100%;font-size:11px;line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dashboard .app-tile-open small{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#dashboard .apps-page-controls{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:10px;color:#686e74;font-size:11px;font-weight:700}
#dashboard .apps-page-controls button{width:30px;height:25px;border:0;border-radius:9px;background:rgba(255,255,255,.65);color:#e31837;font-size:22px;line-height:1;cursor:pointer}
#dashboard .apps-page-controls button:disabled{opacity:.35;cursor:default}
#dashboard .apps-connection{margin:18px 3px 0;padding:10px 16px;border:1px solid rgba(255,255,255,.7);border-radius:13px;background:rgba(255,255,255,.55);color:#424648;font-size:12px;font-weight:700;cursor:pointer}
#dashboard .dock-item[hidden]{display:none!important}
#dashboard .dock{overflow-x:auto;scrollbar-width:none}
#dashboard .dock::-webkit-scrollbar{display:none}
#dashboard .launchpad-button{position:sticky;right:0;background:rgba(250,250,251,.64)}
@media(max-width:720px){
  #dashboard .apps-menu{right:8px;bottom:72px;max-height:calc(100dvh - 82px);padding:12px}
  #dashboard .apps-pages{min-height:350px}
  #dashboard .apps-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  #dashboard .app-tile{height:80px;padding:3px}
  #dashboard .app-tile-open .app-tile-icon img{width:27px;height:27px}
  #dashboard .app-tile-open strong{font-size:9px}
  #dashboard .app-tile-open small{font-size:7px}
  #dashboard .dock-item{min-width:45px}
}

/* O lançador de aplicações ocupa o centro do ecrã e usa vidro translúcido. */
#dashboard .apps-menu{
  position:fixed;top:50%;left:50%;right:auto;bottom:auto;
  width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 36px);
  transform:translate(-50%,-50%);overflow-y:auto;
  border:1px solid rgba(255,255,255,.66);border-radius:30px;
  background:linear-gradient(145deg,rgba(250,250,250,.48),rgba(238,239,239,.34));
  box-shadow:0 26px 75px rgba(47,49,51,.25),inset 0 1px rgba(255,255,255,.78),inset 0 -1px rgba(255,255,255,.22);
  -webkit-backdrop-filter:blur(38px) saturate(1.55);backdrop-filter:blur(38px) saturate(1.55);
}
#dashboard .apps-menu::before{content:"";position:absolute;inset:0 0 auto;height:44%;border-radius:inherit;pointer-events:none;background:linear-gradient(155deg,rgba(255,255,255,.4),transparent 65%)}
#dashboard .apps-menu>*{position:relative}
#dashboard .app-tile{background:rgba(255,255,255,.38);border:1px solid rgba(255,255,255,.43);box-shadow:inset 0 1px rgba(255,255,255,.63),0 5px 17px rgba(65,68,72,.07)}

/* A dock só pode ficar em baixo ou à esquerda, como no CarPlay. */
@media(min-width:481px){
  #dashboard[data-dock-position=left]{height:100vh;height:100dvh;min-height:0;overflow:hidden;display:grid;grid-template-columns:66px minmax(0,1fr);grid-template-rows:minmax(0,1fr);column-gap:7px;row-gap:0;padding:18px 8px}
  #dashboard[data-dock-position=left]>.workspace{grid-column:2;grid-row:1;min-width:0;min-height:0}
  #dashboard[data-dock-position=left]>.footer-bar{grid-column:1;grid-row:1;width:66px;height:auto;min-height:0;flex:none;flex-direction:column;align-items:stretch;justify-content:center}
  #dashboard[data-dock-position=left] .dock{width:58px;height:100%;min-height:0;max-height:100%;flex:1;flex-direction:column;align-items:stretch;justify-content:space-between;gap:2px;padding:5px 3px;overflow:hidden}
  #dashboard[data-dock-position=left] .dock-item{width:100%;height:auto;min-height:0;flex:1 1 40px;padding:1px 0;gap:1px;font-size:0;line-height:1}
  #dashboard[data-dock-position=left] .dock-item>span:last-child{display:none}
  #dashboard[data-dock-position=left] .dock .sprite-icon,#dashboard[data-dock-position=left] .dock .whatsapp-logo,#dashboard[data-dock-position=left] .tesla-dock-mark{width:40px;height:40px}
  #dashboard[data-dock-position=left] .privacy-note{display:none}
  #dashboard[data-dock-position=left] .launchpad-button{position:static}
}
#dashboard .dock-position-icon{display:grid;place-items:center;background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(220,225,230,.64));color:#536273}
#dashboard .dock-position-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#dashboard .dock-position-button:hover .dock-position-icon{background:linear-gradient(145deg,#fff,rgba(218,225,232,.82))}
/* Todos os atalhos permanecem visíveis; o menu de aplicações limita a dock a doze apps. */
#dashboard .dock{overflow:hidden}
@media(min-width:481px){#dashboard[data-dock-position=left] .dock .sprite-icon,#dashboard[data-dock-position=left] .dock .whatsapp-logo,#dashboard[data-dock-position=left] .tesla-dock-mark{width:40px;height:40px}}
#dashboard[data-dock-position=bottom] .dock-item>span:last-child{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dashboard[data-dock-position=bottom] .dock{width:max-content;max-width:100%}
#dashboard[data-dock-position=bottom] .dock-item{flex:0 1 76px;width:76px;min-width:0}
#dashboard[data-dock-position=bottom] .dock .sprite-icon,#dashboard[data-dock-position=bottom] .dock .whatsapp-logo,#dashboard[data-dock-position=bottom] .dock .tesla-dock-mark{width:40px;height:40px}
@media(max-width:1080px){
  #dashboard[data-dock-position=bottom] .dock{width:100%}
  #dashboard[data-dock-position=bottom] .dock-item{flex:1 1 0;width:auto}
}
@media(max-height:560px) and (min-width:481px){
  #dashboard[data-dock-position=left] .dock .sprite-icon,#dashboard[data-dock-position=left] .dock .whatsapp-logo,#dashboard[data-dock-position=left] .tesla-dock-mark{width:32px;height:32px}
}
#dashboard .app-tile:focus-within,#dashboard .app-tile:hover{background:rgba(255,255,255,.59)}
#dashboard .apps-availability-note{margin:20px 3px 0;padding:15px 17px;border:1px solid rgba(255,255,255,.47);border-radius:16px;background:rgba(255,255,255,.28);color:#4a4e51;font-size:11px;line-height:1.45}
@media(max-width:720px){
  #dashboard .apps-menu{top:50%;left:50%;right:auto;bottom:auto;width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:12px;transform:translate(-50%,-50%)}
}

/* Aparência: automático acompanha prefers-color-scheme quando o browser o comunica. */
.theme-control{position:relative;z-index:80}
#dashboard .topbar{position:relative;z-index:20;overflow:visible}
#dashboard .theme-toggle{display:grid;place-items:center;width:30px;height:30px;padding:0;font-size:19px;line-height:1}
.theme-toggle[aria-expanded=true]{background:rgba(255,255,255,.4)}
.theme-menu{position:absolute;z-index:80;top:calc(100% + 10px);right:0;width:232px;padding:10px;border-radius:18px;color:#35383a;background:rgba(250,250,250,.94);box-shadow:0 18px 42px rgba(41,43,46,.28)}
.theme-menu strong{display:block;padding:5px 8px 8px;font-size:12px}
.theme-menu button{display:block;width:100%;padding:10px 11px;border:0;border-radius:11px;background:transparent;color:inherit;text-align:left;font-size:12px;font-weight:700;cursor:pointer}
.theme-menu button small{display:block;margin-top:3px;font-size:9px;font-weight:500;opacity:.7}
.theme-menu button:hover,.theme-menu button[aria-pressed=true]{background:rgba(135,141,146,.16)}
.theme-menu p{margin:7px 8px 4px;font-size:9px;line-height:1.4;color:#63686d}

:root[data-theme=dark]{color-scheme:dark;--ink:#f7f7f8;--muted:#babdc0;--glass:rgba(31,33,35,.68);--line:rgba(208,211,213,.19);--shadow:0 18px 44px rgba(7,7,8,.44),inset 0 1px 0 rgba(255,255,255,.13)}
:root[data-theme=dark] body{background:#151618;color:var(--ink)}
:root[data-theme=dark] .scene{filter:blur(28px) saturate(.1) brightness(.32)}
:root[data-theme=dark] body::before{background:linear-gradient(115deg,rgba(15,15,16,.82),rgba(29,30,32,.66) 52%,rgba(29,30,32,.82)),radial-gradient(circle at 48% 0,rgba(106,111,117,.13),transparent 48%)}
:root[data-theme=dark] .glass-solid{background:rgba(38,39,41,.84);border-color:rgba(204,207,209,.2);box-shadow:0 10px 28px rgba(8,8,8,.35)}
:root[data-theme=dark] #dashboard .topbar{background:rgba(25,26,27,.74);border-color:rgba(217,219,220,.22);box-shadow:0 12px 36px rgba(6,6,7,.34),inset 0 1px rgba(255,255,255,.1)}
:root[data-theme=dark] :is(#dashboard .map-card,#dashboard .music-card,#dashboard .info-card,#dashboard .car-card,#dashboard .mail-card,#dashboard .dock,#dashboard .apps-menu,#dashboard .connection-panel,#dashboard .car-settings){background:linear-gradient(145deg,rgba(41,43,45,.78),rgba(28,29,31,.7));border-color:rgba(208,211,213,.19);box-shadow:0 18px 42px rgba(8,8,8,.34),inset 0 1px rgba(255,255,255,.1);color:#f7f7f8}
:root[data-theme=dark] #dashboard .map-card{background:rgba(31,33,35,.88)}
:root[data-theme=dark] #live-map{background:#292c2e}
:root[data-theme=dark] #live-map .maplibregl-canvas{filter:invert(.87) hue-rotate(180deg) brightness(.72) contrast(.9)}

/* Mapa vetorial em perspetiva, recuperando a sensação de estrada da referência CarPlay. */
#live-map{transform:none!important;perspective:none}
#live-map .maplibregl-canvas{outline:0}
#live-map .maplibregl-ctrl-bottom-right{right:8px;bottom:48px}
#live-map .maplibregl-ctrl-attrib{border-radius:8px;background:rgba(250,251,252,.78);font-size:8px;backdrop-filter:blur(8px)}
#live-map .maplibregl-ctrl-logo{opacity:.86}
.map-3d-marker{width:42px;height:58px;display:grid;place-items:center;filter:drop-shadow(0 5px 7px rgba(16,29,40,.5));pointer-events:none}
.map-3d-marker span{width:100%;height:100%;display:grid;place-items:center;background:transparent;border:0;border-radius:0;box-shadow:none}
.map-3d-marker.is-destination span{width:18px;height:18px;background:var(--marker-color);border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 4px rgba(123,86,207,.23)}
.map-3d-marker.is-position span{width:42px;height:58px}
.map-3d-marker.is-position svg{width:100%;height:100%;overflow:visible;transform:rotate(var(--marker-heading,0deg));transform-origin:center}
.map-3d-marker .vehicle-shadow{fill:#102c45;opacity:.45;transform:translate(0 2px)}
.map-3d-marker .vehicle-body{fill:#f8fbff;stroke:#147cdf;stroke-width:2.5}
.map-3d-marker .vehicle-glass{fill:#718a99;stroke:#d7edf8;stroke-width:1.2}
.map-3d-marker .vehicle-wheel{fill:#24323a}
.map-3d-marker .vehicle-light{fill:#ffe9a8}
:root[data-theme=dark] :is(.eyebrow,.source-label,.music-album,.music-playback,.music-control-note,.art-caption,.service-state small,.car-status small,.empty-panel small,.ios-row-copy small,.ios-list-footer,.privacy-note,.connection-panel small,.connection-panel p,.apps-availability-note,.apps-page-controls,.mail-row time,.mail-empty,.mail-source,.map-note,.route-summary small,.map-attribution,.music-progress time,.attempt-detail){color:#bec1c4}
:root[data-theme=dark] :is(.music-artist,.track-detail,.car-metrics strong,.car-metrics span,.car-settings label,.car-settings-label,.connection-diagnostic strong,.diagnostic-list strong){color:#eaebec}
:root[data-theme=dark] :is(.state-pill,.empty-panel,.ios-calendar-row,.ios-reminder-row,.connection-diagnostic,.connection-status-list div,.diagnostic-list li,.whatsapp-note,.gmail-form,.map-attribution,.route-summary,.maneuver-balloon:not([data-level="0"]),#dashboard .app-tile,.apps-availability-note){background:rgba(55,57,60,.72);border-color:rgba(217,219,221,.15);color:#f1f1f2;box-shadow:inset 0 1px rgba(255,255,255,.08)}
:root[data-theme=dark] #dashboard .info-card .ios-list{background:rgba(20,21,23,.82);border-color:rgba(208,211,213,.18);box-shadow:inset 0 1px rgba(255,255,255,.07)}
:root[data-theme=dark] #dashboard .ios-calendar-row time{color:#c7cacc}
:root[data-theme=dark] #dashboard .ios-row-copy small{color:#b9bdc0}
:root[data-theme=dark] :is(.map-search input,.login-card input,.phone-card input,.calendar-add-form input,.gmail-form input,#dashboard .car-settings select){background:rgba(52,54,57,.92);border:1px solid rgba(217,219,221,.19);color:#f9f9fa}
:root[data-theme=dark] input::placeholder{color:#b7bbbe}
:root[data-theme=dark] :is(.secondary-button,.map-zoom button,.calendar-refresh,.music-control,.mail-tabs button,#dashboard .car-settings-toggle,.apps-page-controls button,.theme-menu button[aria-pressed=true],#dashboard .car-wheel-options button){background:rgba(71,75,78,.76);border-color:rgba(221,223,224,.2);color:#f3f3f4;box-shadow:inset 0 1px rgba(255,255,255,.08)}
:root[data-theme=dark] #dashboard .car-wheel-options button[aria-pressed=true]{background:rgba(110,117,123,.7);border-color:rgba(228,232,235,.45);color:#fff}
:root[data-theme=dark] :is(.dock-item,.apps-menu,.apps-menu button,#dashboard .app-tile-open){color:#f6f6f6}
:root[data-theme=dark] :is(.dock-item.active,.dock-item:hover,.mail-tabs button[aria-selected=true],#dashboard .launchpad-button,.theme-menu button:hover){background:rgba(122,128,134,.28);color:#fff}
:root[data-theme=dark] .theme-menu{background:rgba(36,37,39,.96);border-color:rgba(215,217,219,.2);color:#f6f6f7}
:root[data-theme=dark] .theme-menu p{color:#babdc0}
:root[data-theme=dark] #dashboard .apps-menu::before{background:linear-gradient(155deg,rgba(255,255,255,.11),transparent 65%)}
:root[data-theme=dark] .music-card::after{opacity:.45}

/* Widgets do painel: vidro claro, tipografia legível e sem cartões de atalhos opacos. */
#dashboard .apps-menu{background:linear-gradient(145deg,rgba(249,249,249,.38),rgba(235,236,237,.24));-webkit-backdrop-filter:blur(36px) saturate(1.35);backdrop-filter:blur(36px) saturate(1.35)}
#dashboard .app-tile{height:92px;background:rgba(255,255,255,.19);border:1px solid rgba(255,255,255,.48);box-shadow:inset 0 1px rgba(255,255,255,.35),0 6px 20px rgba(64,67,70,.05)}
#dashboard .app-tile:hover,#dashboard .app-tile:focus-within{background:rgba(255,255,255,.32)}
#dashboard .widget-tile{align-items:center;justify-content:center;gap:2px;color:#373a3c;cursor:grab;text-align:center}
#dashboard .widget-tile:active{cursor:grabbing}
#dashboard .widget-tile-symbol{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:rgba(255,255,255,.37);font-size:25px;font-weight:300}
#dashboard .widget-tile strong{font-size:11px}
#dashboard .widget-tile small{font-size:8px;color:#666c71}
#dashboard[data-layout=unified] .workspace>.dashboard-widget:not([hidden]){display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;padding:28px;overflow:hidden;border:1px solid rgba(255,255,255,.56);border-radius:28px;background:linear-gradient(145deg,rgba(251,251,251,.47),rgba(235,236,237,.25));-webkit-backdrop-filter:blur(24px) saturate(1.2);backdrop-filter:blur(24px) saturate(1.2);box-shadow:inset 0 1px rgba(255,255,255,.48),0 12px 32px rgba(63,67,70,.1)}
#dashboard .dashboard-widget .card-arrange{position:absolute;top:12px;right:12px;z-index:2}
#dashboard .widget-kicker{font-size:10px;font-weight:750;letter-spacing:1.4px;color:#6a7176}
#dashboard .widget-primary{max-width:100%;font-size:clamp(32px,4vw,72px);line-height:1.02;font-weight:550;letter-spacing:-2px;overflow:hidden;text-overflow:ellipsis}
#dashboard .widget-primary.widget-summary{font-size:clamp(19px,2.5vw,36px);line-height:1.12;letter-spacing:-.6px;overflow-wrap:anywhere}
#dashboard .widget-secondary{font-size:clamp(10px,1vw,14px);line-height:1.4;color:#666c71}
#dashboard .widget-actions{display:flex;gap:8px;margin-top:5px}
#dashboard .widget-actions button{padding:8px 14px;border:1px solid rgba(255,255,255,.56);border-radius:11px;background:rgba(255,255,255,.28);color:inherit;font:inherit;font-size:12px;cursor:pointer}
#dashboard .analog-clock-widget{align-items:center!important;gap:4px!important}
#dashboard .battery-widget{align-items:flex-start!important;gap:12px!important}
#dashboard .battery-widget .widget-primary{font-variant-numeric:tabular-nums}
#dashboard .battery-widget-track{width:100%;height:12px;border-radius:99px;background:rgba(75,79,83,.16);overflow:hidden}
#dashboard .battery-widget-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#58bd75,#78d68b);transition:width .35s ease}
#dashboard .analog-clock-face{width:min(64%,220px);height:auto;overflow:visible;color:#202326;filter:drop-shadow(0 3px 8px rgba(30,35,40,.08))}
#dashboard .analog-clock-face .clock-rim{fill:rgba(255,255,255,.74);stroke:rgba(80,86,91,.2);stroke-width:.8}
#dashboard .analog-clock-face #widget-analog-ticks line{stroke:rgba(48,53,57,.5);stroke-width:.7;stroke-linecap:round}
#dashboard .analog-clock-face #widget-analog-ticks line.major{stroke:rgba(35,40,44,.8);stroke-width:1.25}
#dashboard .analog-clock-face .clock-pin{fill:#e4544b}
#dashboard .analog-clock-face text{fill:currentColor;font:550 8px system-ui,-apple-system,sans-serif}
#dashboard .analog-clock-face #widget-analog-hour,#dashboard .analog-clock-face #widget-analog-minute,#dashboard .analog-clock-face #widget-analog-second{stroke:currentColor;stroke-linecap:round;stroke-width:3}
#dashboard .analog-clock-face #widget-analog-minute{stroke-width:2}
#dashboard .analog-clock-face #widget-analog-second{stroke:#e4544b;stroke-width:.8}
#dashboard .digital-clock-widget .widget-primary{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display",system-ui,sans-serif;font-size:clamp(42px,5.2vw,78px);font-weight:570;font-variant-numeric:tabular-nums;letter-spacing:-.075em;text-shadow:0 1px rgba(255,255,255,.3)}
#dashboard .calendar-month-widget,#dashboard .calendar-week-widget{justify-content:flex-start!important;gap:10px!important}
#dashboard .calendar-widget-heading{display:flex;width:100%;align-items:baseline;justify-content:space-between;gap:8px;padding-right:24px}
#dashboard .calendar-widget-heading>strong{font-size:15px;font-weight:650;text-transform:capitalize}
#dashboard .calendar-month-grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
#dashboard .calendar-month-weekday{padding:2px 0;color:#747b80;font-size:9px;font-weight:650}
#dashboard .calendar-month-day,#dashboard .calendar-month-empty{position:relative;display:grid;min-height:21px;place-items:center;border-radius:50%;font-size:10px;font-variant-numeric:tabular-nums}
#dashboard .calendar-month-day.is-today{background:#2676e8;color:white;font-weight:700}
#dashboard .calendar-month-day.has-events::after{position:absolute;bottom:1px;width:3px;height:3px;border-radius:50%;background:#e4544b;content:""}
#dashboard .calendar-month-day.is-today.has-events::after{background:white}
#dashboard .calendar-week-grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
#dashboard .calendar-week-day{display:flex;min-height:76px;flex-direction:column;align-items:center;gap:7px;padding:8px 2px;border:1px solid rgba(120,126,130,.14);border-radius:14px}
#dashboard .calendar-week-day>span{color:#747b80;font-size:9px;text-transform:capitalize}
#dashboard .calendar-week-day>strong{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;font-size:12px;font-weight:550}
#dashboard .calendar-week-day.is-today>strong{background:#2676e8;color:white;font-weight:700}
#dashboard .calendar-week-day>i{width:4px;height:4px;border-radius:50%;background:#e4544b}
:root[data-theme=dark] #dashboard .calendar-month-weekday,:root[data-theme=dark] #dashboard .calendar-week-day>span{color:#c2c7ca}
:root[data-theme=dark] #dashboard .calendar-week-day{border-color:rgba(210,212,214,.2)}
#dashboard .notes-card{display:flex;flex-direction:column;gap:12px;min-width:0;padding:22px;overflow:hidden}
#dashboard .notes-app-icon{width:42px;height:42px;flex:none}
#dashboard .notes-list{display:flex;flex:1;min-height:0;flex-direction:column;gap:2px;overflow:auto}
#dashboard .notes-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 8px;border-bottom:1px solid rgba(120,126,130,.13)}
#dashboard .notes-row .ios-row-copy{min-width:0}
#dashboard .notes-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650}
#dashboard .notes-row small{display:-webkit-box;margin-top:4px;overflow:hidden;color:#697076;font-size:11px;line-height:1.4;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#dashboard .notes-row time{color:#70777c;font-size:10px;white-space:nowrap}
#dashboard .notes-empty{margin:auto;color:#6b7277;font-size:13px;text-align:center}
#dashboard .notes-privacy{margin:0;color:#737a7e;font-size:10px;line-height:1.4}
:root[data-theme=dark] #dashboard .dashboard-widget:not([hidden]),:root[data-theme=dark] #dashboard .app-tile{background:rgba(46,48,51,.48);border-color:rgba(210,212,214,.2);color:#f6f6f6}
:root[data-theme=dark] #dashboard .notes-row small,:root[data-theme=dark] #dashboard .notes-privacy,:root[data-theme=dark] #dashboard .notes-row time{color:#c2c7ca}
:root[data-theme=dark] #dashboard .analog-clock-face{color:#f3f4f5}
:root[data-theme=dark] #dashboard .analog-clock-face .clock-rim{fill:rgba(31,33,35,.76);stroke:rgba(225,230,233,.3)}
:root[data-theme=dark] #dashboard .analog-clock-face #widget-analog-ticks line{stroke:rgba(230,233,235,.52)}
:root[data-theme=dark] #dashboard .analog-clock-face #widget-analog-ticks line.major{stroke:rgba(248,249,250,.9)}
:root[data-theme=dark] #dashboard .widget-secondary,:root[data-theme=dark] #dashboard .widget-tile small{color:#cbced0}
@media(max-width:720px){#dashboard .app-tile{height:78px}#dashboard .widget-tile-symbol{width:28px;height:28px;font-size:21px}#dashboard[data-layout=unified] .workspace>.dashboard-widget:not([hidden]){min-height:175px!important;padding:26px}}
:root[data-theme=dark] :is(.map-attribution a,.apps-page-controls button,.route-summary button){color:#bec2c5}
:root[data-theme=dark] .album-art.is-placeholder{background:linear-gradient(150deg,#404447,#2d2f31);box-shadow:inset 0 0 0 2px rgba(216,218,220,.12),0 10px 22px rgba(8,8,8,.24)}
:root[data-theme=dark] .album-art.is-placeholder .art-note{color:#bfc2c5}
:root[data-theme=dark] .album-art.is-placeholder::after{border-color:rgba(202,205,207,.36)}

/* O leitor passa a uma faixa quando a divisória deixa pouco espaço vertical. */
#dashboard[data-layout=unified] .workspace>.music-card[data-mini=true]:not([hidden]){
  display:grid!important;
  grid-template-columns:minmax(52px,84px) minmax(0,1fr);
  align-items:center;
  justify-content:stretch!important;
  gap:12px;
  padding:10px 14px!important;
  text-align:left;
  overflow:hidden;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .big-art{
  width:min(84px,calc(var(--card-h,126px) - 24px))!important;
  max-width:100%;
  height:auto;
  aspect-ratio:1;
  border-radius:15px;
  justify-self:center;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .track-info{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:repeat(4,auto);
  align-content:center;
  align-items:center;
  column-gap:10px;
  width:100%;
  height:100%;
  min-width:0;
  text-align:left;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-title-line{
  grid-column:1;
  grid-row:1;
  justify-content:flex-start!important;
  margin:0;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-source-name{font-size:10px;padding:2px 7px}
#dashboard[data-layout=unified] .music-card[data-mini=true] #music-title{
  display:block!important;
  grid-column:1;
  grid-row:2;
  min-width:0;
  margin:0!important;
  font-size:clamp(14px,1.8vw,18px)!important;
  line-height:1.15;
  white-space:nowrap!important;
  overflow:hidden;
  text-overflow:ellipsis;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-artist{
  grid-column:1;
  grid-row:3;
  margin:0;
  font-size:12px;
  line-height:1.2;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-album,
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-source-line,
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-playback{display:none}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-progress{
  grid-column:1;
  grid-row:4;
  gap:5px;
  margin:4px 0 0;
}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-progress time{font-size:10px;min-width:auto}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-progress-track{height:5px}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-controls{
  grid-column:2;
  grid-row:1/5;
  display:flex;
  justify-content:flex-end!important;
  align-items:center;
  width:auto;
  gap:5px;
  margin:0;
}
#dashboard[data-layout=unified] .music-card[data-mini=true]{--ctl:36px;--ctl-main:44px;--ctl-gap:5px}
#dashboard[data-layout=unified] .music-card[data-mini=true] .music-control-note:not(:empty){
  position:absolute;
  right:14px;
  bottom:2px;
  max-width:calc(100% - 115px);
  margin:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:10px;
}
@media(max-width:430px){
  #dashboard[data-layout=unified] .workspace>.music-card[data-mini=true]:not([hidden]){grid-template-columns:56px minmax(0,1fr);gap:8px;padding-inline:10px!important}
  #dashboard[data-layout=unified] .music-card[data-mini=true] .big-art{width:min(56px,calc(var(--card-h,126px) - 24px))!important}
  #dashboard[data-layout=unified] .music-card[data-mini=true] .track-info{column-gap:6px}
  #dashboard[data-layout=unified] .music-card[data-mini=true]{--ctl:30px;--ctl-main:38px;--ctl-gap:3px}
  #dashboard[data-layout=unified] .music-card[data-mini=true] .music-controls{gap:3px}
}

/* Numa caixa alta e estreita, a capa ocupa o espaço livre; os dados assentam em baixo. */
#dashboard[data-layout=unified] .workspace>.music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]):not([hidden]){
  --ctl:54px;
  --ctl-main:64px;
  --ctl-gap:14px;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:space-between!important;
  gap:8px;
  padding:16px 18px 14px!important;
  text-align:center;
  overflow:hidden;
}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .big-art{
  width:clamp(105px,min(100%,calc(var(--card-h,600px) - 205px)),440px)!important;
  max-width:100%;
  height:auto;
  aspect-ratio:1;
}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .track-info{
  flex:0 1 auto;
  margin-top:auto;
  min-height:0;
  text-align:center;
}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-source-name{font-size:11px;padding:4px 10px}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) #music-title{margin:3px 0 2px}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-artist{margin-bottom:2px}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-album{display:none}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-progress{margin:7px 0 2px}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-controls{margin-top:8px}
#dashboard[data-layout=unified] .music-card:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .music-control-note:empty{display:none}

/* Os dois widgets do topo começam na mesma linha e o evento usa todo o espaço disponível. */
#dashboard[data-layout=unified] .workspace>:is(#widget-date-card,#widget-calendar-card):not([hidden]){
  justify-content:flex-start!important;
  gap:5px;
  padding:26px 22px 14px;
}
#dashboard #widget-calendar-value{
  font-size:clamp(17px,2vw,23px);
  line-height:1.12;
  letter-spacing:-.45px;
  overflow:visible;
  text-overflow:clip;
}
#dashboard #widget-calendar-detail{line-height:1.25;overflow-wrap:anywhere}

/* Caixa de música baixa, mas ainda com altura para uma capa maior e controlos por baixo. */
#dashboard[data-layout=unified] .workspace>.music-card[data-music-medium=true]:not([hidden]){
  display:grid!important;
  grid-template-columns:minmax(152px,40%) minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px 12px;
  padding:14px!important;
  overflow:hidden;
}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .big-art{
  grid-column:1;
  grid-row:1/4;
  width:min(100%,calc(var(--card-h,280px) - 32px),calc(var(--card-w,480px) * .4),320px)!important;
  max-width:100%;
  height:auto;
  aspect-ratio:1;
  border-radius:18px;
  justify-self:center;
}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .track-info{
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  height:auto;
  min-width:0;
}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .music-title-line{justify-content:flex-start!important}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] #music-title{
  white-space:normal!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .music-progress{width:100%;margin-top:7px}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .music-controls{
  grid-column:2;
  grid-row:2;
  justify-content:flex-start!important;
  width:100%;
  gap:8px;
  margin:0;
}
#dashboard[data-layout=unified] .music-card[data-music-medium=true]{--ctl:36px;--ctl-main:44px;--ctl-gap:8px}
#dashboard[data-layout=unified] .music-card[data-music-medium=true] .music-control-note{
  grid-column:2;
  grid-row:3;
  margin:0;
  text-align:left;
}
#dashboard[data-layout=unified] .workspace>.music-card[data-mini=true]:not([data-music-medium=true]):not([hidden]){
  grid-template-columns:minmax(48px,76px) minmax(0,1fr);
  gap:7px;
  padding:8px!important;
}
#dashboard[data-layout=unified] .music-card[data-mini=true]:not([data-music-medium=true]) .big-art{
  width:clamp(48px,min(calc(var(--card-h,150px) - 22px),calc(var(--card-w,400px) * .18)),76px)!important;
}
#dashboard[data-layout=unified] .music-card[data-mini=true]:not([data-music-medium=true]) .track-info{column-gap:5px}
#dashboard[data-layout=unified] .music-card[data-mini=true]:not([data-music-medium=true]){--ctl:30px;--ctl-main:38px;--ctl-gap:3px}
#dashboard[data-layout=unified] .music-card[data-mini=true]:not([data-music-medium=true]) #music-title{font-size:14px!important}

/* Nos painéis de música, capa, texto e botões partilham a largura sem apertar a faixa. */
#dashboard[data-layout=unified][data-layout-mode=split] .workspace>.music-card[data-wide=true]:not([data-compact=true]):not([hidden]):not([data-solo]){
  display:grid!important;
  grid-template-columns:minmax(180px,42%) minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto auto;
  align-items:center;
  gap:14px 24px;
  padding:30px 26px 22px;
  text-align:left;
  overflow:hidden;
}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .big-art{
  grid-column:1;
  grid-row:1/4;
  width:min(100%,calc(var(--card-h,700px) - 300px),460px)!important;
  max-width:100%;
  height:auto;
  aspect-ratio:1;
  justify-self:center;
}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .track-info{grid-column:2;grid-row:1;align-self:end}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .music-title-line{justify-content:flex-start!important}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .music-controls{
  grid-column:2;
  grid-row:2;
  justify-content:flex-start!important;
  width:100%;
  margin:0;
}
#dashboard[data-layout=unified][data-layout-mode=split] .music-card[data-wide=true]:not([data-compact=true]) .music-control-note{grid-column:2;grid-row:3;margin:0;text-align:left}

/* Lançador compacto: vidro mais leve, tiles próximos e passagem lateral entre páginas. */
#dashboard .apps-menu{
  width:min(590px,calc(100vw - 24px));
  max-height:calc(100vh - 72px);
  max-height:calc(100dvh - 72px);
  padding:13px 14px 10px;
  background:linear-gradient(145deg,rgba(249,249,249,.29),rgba(235,236,237,.17));
  -webkit-backdrop-filter:blur(22px) saturate(1.2);
  backdrop-filter:blur(22px) saturate(1.2);
}
#dashboard .apps-pages{min-height:0}
#dashboard .apps-page h3{margin:8px 2px 5px}
#dashboard .apps-grid{gap:5px}
#dashboard .app-tile{height:76px;border-radius:14px}
#dashboard .app-tile-open .app-tile-icon img,#dashboard .app-layout-tile .app-tile-icon img{width:32px;height:32px}
#dashboard .apps-availability-note{margin:10px 2px 0;padding:0;border:0;background:transparent;box-shadow:none}
#dashboard .apps-page-controls{margin-top:7px;gap:7px}
#dashboard .apps-page-controls button{
  width:28px;height:28px;padding:0;border:0;border-radius:50%;
  background:transparent;box-shadow:none;font-size:22px;
}
#dashboard .apps-page-controls button:hover{background:rgba(255,255,255,.2)}
#dashboard .apps-menu-heading .round-button{background:transparent;border-color:transparent;box-shadow:none}
#dashboard .apps-menu-body[data-slide=next] .apps-page:not([hidden]){animation:apps-page-next .22s ease-out both}
#dashboard .apps-menu-body[data-slide=previous] .apps-page:not([hidden]){animation:apps-page-previous .22s ease-out both}
@keyframes apps-page-next{from{opacity:.45;transform:translateX(28px)}to{opacity:1;transform:translateX(0)}}
@keyframes apps-page-previous{from{opacity:.45;transform:translateX(-28px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){#dashboard .apps-page:not([hidden]){animation:none!important}}
#dashboard .iphone-header-status{padding-left:8px;border-left:1px solid rgba(255,255,255,.35);white-space:nowrap}
@media(max-width:850px){#dashboard .iphone-header-status{display:none}}
@media(max-width:720px){#dashboard .apps-menu{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}#dashboard .app-tile{height:72px}}

/* Identidade Tesla Dashboard: símbolo fornecido e vermelho da guia de marca. */
.brand-mark{display:block;width:32px;height:32px;flex:none;border-radius:9px;object-fit:cover;box-shadow:0 4px 11px rgba(0,0,0,.22)}
.login-card .login-mark{display:block;width:50px;height:50px;object-fit:cover;border-radius:14px;background:#111;box-shadow:0 11px 24px rgba(17,17,17,.24);margin-bottom:17px}
.phone-brand-mark{display:block;width:48px;height:48px;object-fit:cover;border-radius:13px;background:#111;box-shadow:0 7px 16px rgba(17,17,17,.18);margin-bottom:14px}

/* Launchpad: moldura estável, três filas e ícones sem cartões individuais. */
#dashboard .apps-menu{
  width:min(620px,calc(100vw - 24px));
  height:min(438px,calc(100dvh - 28px));
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:18px 22px 12px;
}
#dashboard .apps-menu[hidden]{display:none}
#dashboard .apps-menu-heading{height:26px;min-height:26px;margin:0 0 7px}
#dashboard .apps-menu-body{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
#dashboard .apps-pages{display:flex;flex:1;min-height:0}
#dashboard .apps-page[hidden]{display:none}
#dashboard .apps-page:not([hidden]){display:grid;flex:1;min-height:0;grid-template-rows:20px minmax(0,1fr) auto;gap:5px}
#dashboard .apps-page h3{align-self:center;margin:0 2px;font-size:12px;line-height:20px}
#dashboard .apps-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:0 4px;min-height:0;align-content:stretch;overflow:hidden}
#dashboard .apps-grid.widget-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
#dashboard .apps-grid.apps-layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#dashboard .app-tile:not(.widget-tile){height:auto;min-height:0;padding:2px;border:0;border-radius:10px;background:transparent;box-shadow:none;touch-action:pan-y}
#dashboard .app-tile:not(.widget-tile):hover,#dashboard .app-tile:not(.widget-tile):focus-within{background:rgba(255,255,255,.16);box-shadow:none}
#dashboard .app-tile-open{gap:4px}
#dashboard .app-tile-open .app-tile-icon img{width:40px;height:40px;border-radius:12px;box-shadow:none}
#dashboard .app-tile-open strong{font-size:9px;font-weight:500;line-height:1.1}
#dashboard .app-tile-open small{display:none}
#dashboard .apps-page-controls{height:22px;min-height:22px;margin:7px 0 0;gap:9px;font-size:10px;font-weight:500}
#dashboard .apps-page-controls button{width:18px;height:18px;border-radius:50%;background:transparent;color:inherit;font-size:15px;opacity:.6}
#dashboard .apps-page-controls button:disabled{visibility:hidden}
#dashboard .apps-connection{justify-self:center;margin:4px 0;padding:4px 8px;border:0;background:transparent;font-size:10px}
#dashboard .apps-capability-note{align-self:center;margin:2px 4px;color:#687077;font-size:9px;line-height:1.4;text-align:center}
#dashboard .app-tile-icon.app-glyph{display:grid;place-items:center;background:rgba(120,128,137,.1);font-size:34px;line-height:1}
#dashboard .dock .sprite-icon.app-glyph{display:grid;place-items:center;overflow:visible;background:rgba(120,128,137,.11);font-size:27px;line-height:1;box-shadow:none}
:root[data-theme=dark] #dashboard .apps-capability-note{color:#c2c7ca}
@media(max-width:720px){
  #dashboard .apps-menu{width:calc(100vw - 20px);height:min(410px,calc(100dvh - 20px));min-height:0;padding:14px 12px 9px}
  #dashboard .apps-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:0 1px}
  #dashboard .app-tile:not(.widget-tile){height:auto;padding:1px}
  #dashboard .app-tile-open .app-tile-icon img{width:40px;height:40px}
  #dashboard .app-tile-open strong{font-size:8px}
}
/* Two independent entry paths: full dashboard (local service) and online WhatsApp only. */
.login-screen{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),420px));place-content:center;place-items:center;gap:16px;overflow:auto}
.whatsapp-contact-group{display:grid;gap:5px}.whatsapp-contact-group h3{margin:10px 2px 2px;font-size:13px;letter-spacing:-.2px}

/* A dock adiciona e remove atalhos pelo gesto, sem botões de ação nas aplicações. */
#dashboard .apps-page-controls{height:auto;min-height:31px;flex-direction:column;gap:1px;margin-top:5px}
#dashboard .apps-dock-hint{font-size:9px;line-height:1.2;font-weight:450;opacity:.72;white-space:nowrap}
#dashboard .dock-drag-preview.will-remove::after{content:'Solta no ecrã para remover';font-size:10px;font-weight:500;opacity:.72}

/* Widgets CarPlay: vidro, dados legíveis e movimento contínuo, sem falsos estados. */
#dashboard .widget-tile-symbol{width:38px;height:38px;border-radius:13px;background:rgba(255,255,255,.4)}
#dashboard .apps-grid.widget-grid{grid-template-rows:repeat(5,minmax(0,1fr));overflow:hidden}
#dashboard .app-tile.widget-tile{height:auto;min-height:0;padding:2px;gap:2px}
#dashboard .app-tile.widget-tile .widget-tile-symbol{width:31px;height:31px;border-radius:11px}
#dashboard .app-tile.widget-tile .widget-tile-symbol svg{width:22px;height:22px}
#dashboard .app-tile.widget-tile strong{font-size:9px;line-height:1.05}
#dashboard .app-tile.widget-tile small{font-size:7px;line-height:1.05}
#dashboard .widget-tile-symbol svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#dashboard .widget-icon-weather{color:#df9a2e;background:linear-gradient(145deg,rgba(255,235,178,.78),rgba(206,226,246,.65))}
#dashboard .widget-icon-forecast{color:#438ad8;background:linear-gradient(145deg,rgba(204,230,255,.8),rgba(220,234,246,.62))}
#dashboard .widget-icon-sun{color:#e49b32;background:linear-gradient(145deg,rgba(255,231,171,.82),rgba(255,249,227,.62))}
#dashboard .widget-icon-compass{color:#e4544b;background:linear-gradient(145deg,rgba(255,226,224,.8),rgba(239,232,232,.62))}
#dashboard .widget-icon-navigation{color:#2181e6;background:linear-gradient(145deg,rgba(212,232,255,.82),rgba(233,240,247,.62))}
#dashboard .widget-icon-range{color:#43a96a;background:linear-gradient(145deg,rgba(213,245,224,.82),rgba(234,245,234,.62))}
#dashboard .dashboard-widget.weather-widget,#dashboard .dashboard-widget.weather-hours-widget,#dashboard .dashboard-widget.sun-widget,#dashboard .dashboard-widget.compass-widget,#dashboard .dashboard-widget.navigation-widget,#dashboard .dashboard-widget.range-widget{position:relative}
#dashboard .weather-widget{align-items:stretch!important;justify-content:flex-start!important;gap:12px!important}
#dashboard .weather-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#dashboard .weather-heading>div{display:grid;min-width:0;gap:3px;overflow-wrap:anywhere}
#dashboard .weather-heading>div>strong{font-size:clamp(15px,1.4vw,21px);font-weight:650;letter-spacing:-.3px}
#dashboard .weather-heading .widget-kicker{font-size:9px}
#dashboard .weather-heading>button{width:32px;height:32px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:rgba(255,255,255,.3);color:inherit;font-size:17px;cursor:pointer;transition:transform .25s ease,background .25s ease}
#dashboard .weather-heading>button:hover{transform:rotate(-12deg);background:rgba(255,255,255,.55)}
#dashboard .weather-heading>button{flex:none}
#dashboard .weather-main{display:flex;min-height:0;flex:1;align-items:center;justify-content:space-between;gap:10px}
#dashboard .weather-condition-icon{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#dashboard .weather-scene{width:min(44%,164px);height:auto;overflow:visible;flex:none;filter:drop-shadow(0 5px 12px rgba(45,71,97,.12))}
#dashboard .weather-scene .weather-sun{display:none;fill:#f4b848;stroke:#f4b848;stroke-width:3;stroke-linecap:round;transform-origin:75px 36px;animation:weather-sun-glow 6s ease-in-out infinite}
#dashboard .weather-scene .weather-moon{display:none;fill:#e4d9ad;stroke:none}
#dashboard .weather-scene .weather-cloud{display:none;fill:rgba(251,253,255,.96);stroke:rgba(153,177,195,.44);stroke-width:2;stroke-linejoin:round;filter:drop-shadow(0 3px 4px rgba(54,77,95,.12));animation:weather-cloud-drift 8s ease-in-out infinite}
#dashboard .weather-scene .weather-rain,#dashboard .weather-scene .weather-snow,#dashboard .weather-scene .weather-lightning{display:none;fill:none;stroke:#4597e7;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
#dashboard .weather-scene .weather-rain path{animation:weather-rain-fall .85s ease-in infinite;stroke-dasharray:8 13}
#dashboard .weather-scene .weather-rain path:nth-child(2){animation-delay:.2s}
#dashboard .weather-scene .weather-rain path:nth-child(3){animation-delay:.4s}
#dashboard .weather-scene .weather-snow{stroke:#9bc7ee;stroke-width:2}
#dashboard .weather-scene .weather-lightning{fill:#f5c34e;stroke:#f5c34e}
#dashboard .weather-scene[data-weather-type="clear"][data-is-day="true"] .weather-sun,#dashboard .weather-scene[data-weather-type="partly"][data-is-day="true"] .weather-sun{display:block}
#dashboard .weather-scene[data-weather-type="clear"][data-is-day="false"] .weather-moon,#dashboard .weather-scene[data-weather-type="partly"][data-is-day="false"] .weather-moon{display:block}
#dashboard .weather-scene[data-weather-type="partly"] .weather-cloud,#dashboard .weather-scene[data-weather-type="cloudy"] .weather-cloud,#dashboard .weather-scene[data-weather-type="fog"] .weather-cloud,#dashboard .weather-scene[data-weather-type="rain"] .weather-cloud,#dashboard .weather-scene[data-weather-type="snow"] .weather-cloud,#dashboard .weather-scene[data-weather-type="storm"] .weather-cloud{display:block}
#dashboard .weather-scene[data-weather-type="rain"] .weather-rain,#dashboard .weather-scene[data-weather-type="snow"] .weather-snow,#dashboard .weather-scene[data-weather-type="storm"] .weather-rain,#dashboard .weather-scene[data-weather-type="storm"] .weather-lightning{display:block}
#dashboard .weather-scene[data-weather-type="storm"] .weather-cloud{fill:#9baaba}
#dashboard .weather-scene[data-weather-type="cloudy"] .weather-cloud,#dashboard .weather-scene[data-weather-type="fog"] .weather-cloud{fill:#c4d1dc}
#dashboard .weather-scene .weather-fog,#dashboard .weather-scene .weather-unknown{display:none;fill:none;stroke:#e3ebf3;stroke-width:4;stroke-linecap:round}
#dashboard .weather-scene[data-weather-type="fog"] .weather-fog{display:block;animation:weather-cloud-drift 6s ease-in-out infinite alternate}
#dashboard .weather-scene[data-weather-type="unknown"] .weather-unknown{display:block}
#dashboard .weather-scene[data-weather-type="snow"] .weather-snow{animation:weather-snow-drift 3s ease-in-out infinite}
#dashboard .weather-reading{display:grid;min-width:0;gap:3px;text-align:right}
#dashboard .weather-reading>strong{font-size:clamp(28px,calc(var(--card-w, 280px) * .20),72px);font-weight:470;line-height:.95;letter-spacing:-.09em;font-variant-numeric:tabular-nums}
#dashboard .weather-reading>span{font-size:clamp(12px,1.2vw,16px);font-weight:600}
#dashboard .weather-reading>small{color:#697178;font-size:10px}
#dashboard .weather-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px solid rgba(105,112,117,.13);color:#737a80;font-size:9px}
#dashboard .weather-footer{flex-wrap:wrap}
#dashboard .weather-footer :empty,#dashboard .weather-reading :empty{display:none}
#dashboard .weather-footer a{color:inherit;text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:2px;opacity:.85}
#dashboard .weather-location-form{position:absolute;z-index:4;inset:48px 14px 14px;display:flex;flex-direction:column;justify-content:center;gap:9px;padding:16px;border:1px solid rgba(255,255,255,.68);border-radius:20px;background:rgba(247,249,250,.9);box-shadow:0 10px 24px rgba(50,56,60,.14);backdrop-filter:blur(26px);-webkit-backdrop-filter:blur(26px)}
#dashboard .weather-location-form[hidden]{display:none}
#dashboard .weather-location-form>label{font-size:11px;font-weight:700}
#dashboard .weather-location-form>div{display:flex;gap:7px}
#dashboard .weather-location-form input{width:100%;min-width:0;padding:9px 11px;border:1px solid rgba(118,128,136,.2);border-radius:12px;background:rgba(255,255,255,.8);color:inherit;font:inherit;font-size:13px;outline:none}
#dashboard .weather-location-form button{flex:none;padding:8px 12px;border:1px solid rgba(255,255,255,.8);border-radius:11px;background:rgba(49,126,213,.9);color:white;font:inherit;font-size:11px;font-weight:650;cursor:pointer}
#dashboard .weather-location-form>small{color:#687178;font-size:9px;line-height:1.35}
#dashboard .weather-hours-widget{justify-content:flex-start!important;gap:11px!important}
#dashboard .weather-hours-grid{display:grid;width:100%;flex:1;grid-template-columns:repeat(6,minmax(0,1fr));align-items:end;gap:6px;min-height:90px}
#dashboard .weather-hour{display:flex;min-width:0;height:100%;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}
#dashboard .weather-hour>span:first-child{font-size:9px;color:#72797e}
#dashboard .weather-rain-rail{display:flex;width:7px;height:25px;align-items:flex-end;overflow:hidden;border-radius:99px;background:rgba(93,157,215,.13)}
#dashboard .weather-rain-rail>i{display:block;width:100%;min-height:4px;border-radius:inherit;background:linear-gradient(0deg,#348ce2,#83c7ff);transition:height .8s cubic-bezier(.2,.7,.15,1)}
#dashboard .weather-hour>strong{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
#dashboard .weather-hour>small{color:#748087;font-size:8px}
#dashboard .weather-hours-widget>.widget-secondary{font-size:9px}
#dashboard .sun-widget{align-items:center!important;justify-content:flex-start!important;gap:6px!important}
#dashboard .sun-widget>.widget-kicker{align-self:flex-start}
#dashboard .sun-arc{width:min(86%,270px);max-height:126px;overflow:visible;margin-top:2px}
#dashboard .sun-arc-track,#dashboard .sun-arc-progress{fill:none;stroke-width:5;stroke-linecap:round}
#dashboard .sun-arc-track{stroke:rgba(122,132,140,.18)}
#dashboard .sun-arc-progress{stroke:#efb64d;transition:stroke-dashoffset 1s cubic-bezier(.2,.65,.2,1)}
#dashboard .sun-arc-orb{fill:#f4b743;stroke:#fff;stroke-width:2;filter:drop-shadow(0 2px 5px rgba(221,155,39,.35));transition:cx 1s cubic-bezier(.2,.65,.2,1),cy 1s cubic-bezier(.2,.65,.2,1)}
#dashboard .sun-times{display:flex;width:100%;align-items:center;justify-content:space-between;gap:7px;margin-top:-8px}
#dashboard .sun-times>span{display:grid;gap:2px;text-align:center}
#dashboard .sun-times>span small{color:#737a80;font-size:8px}
#dashboard .sun-times>span strong{font-size:12px;font-variant-numeric:tabular-nums}
#dashboard .sun-times>#widget-sun-period{max-width:40%;font-size:10px;text-align:center}
#dashboard .sun-widget>.widget-secondary{font-size:8px}
#dashboard .compass-widget{align-items:center!important;gap:4px!important}
#dashboard .compass-widget>.widget-kicker{align-self:flex-start}
#dashboard .compass-face{width:min(54%,174px);height:auto;overflow:visible;color:#383e43;filter:drop-shadow(0 4px 9px rgba(35,44,51,.1))}
#dashboard .compass-face .compass-rim{fill:rgba(255,255,255,.48);stroke:rgba(94,105,112,.25);stroke-width:1.2}
#dashboard .compass-face text{fill:#788087;font:650 8px system-ui,-apple-system,sans-serif}
#dashboard .compass-face #widget-compass-needle{transform-origin:60px 60px;transition:transform .65s cubic-bezier(.18,.72,.2,1)}
#dashboard .compass-face .compass-north{fill:#e4544b}
#dashboard .compass-face .compass-south{fill:#aab2b8}
#dashboard .compass-face #widget-compass-needle circle{fill:#fff;stroke:#8c969d;stroke-width:1}
#dashboard .compass-widget .widget-primary{font-size:clamp(24px,3vw,38px);letter-spacing:-1px;font-variant-numeric:tabular-nums}
#dashboard .compass-widget .widget-secondary{text-align:center}
#dashboard .navigation-widget{align-items:flex-start!important;gap:13px!important}
#dashboard .navigation-widget .widget-primary{font-size:clamp(19px,2.7vw,35px)}
#dashboard .navigation-path{position:relative;width:100%;height:42px;margin:2px 0 3px;overflow:hidden;border:1px solid rgba(255,255,255,.45);border-radius:13px;background:linear-gradient(145deg,rgba(222,235,245,.32),rgba(247,249,250,.18))}
#dashboard .navigation-path::before{position:absolute;inset:0;background:repeating-linear-gradient(135deg,transparent 0 11px,rgba(44,132,217,.1) 11px 13px);content:"";opacity:.35}
#dashboard .navigation-path>i{position:absolute;top:50%;left:12%;width:76%;border-top:2px dashed rgba(53,142,224,.4);transform:translateY(-50%)}
#dashboard .navigation-path.is-active>i{border-color:#3389df;animation:navigation-flow 2.4s linear infinite}
#dashboard .navigation-path.is-active::after{position:absolute;top:50%;left:12%;width:7px;height:7px;border-radius:50%;background:#3389df;box-shadow:0 0 0 4px rgba(51,137,223,.15);content:"";transform:translateY(-50%)}
#dashboard .range-widget{align-items:flex-start!important;justify-content:flex-start!important;gap:16px!important}
#dashboard .range-body{display:flex;width:100%;min-height:0;flex:1;align-items:center;gap:15px}
#dashboard .range-ring{width:min(40%,132px);height:auto;flex:none;overflow:visible}
#dashboard .range-ring-track,#dashboard .range-ring-value{fill:none;stroke-width:7}
#dashboard .range-ring-track{stroke:rgba(94,111,119,.15)}
#dashboard .range-ring-value{stroke:#55bd78;stroke-linecap:round;transition:stroke-dashoffset .75s cubic-bezier(.2,.7,.2,1)}
#dashboard .range-ring text{fill:#737b80;font:700 7px system-ui,-apple-system,sans-serif;letter-spacing:1px}
#dashboard .range-body>div{display:grid;min-width:0;gap:8px}
#dashboard .range-body .widget-primary{font-size:clamp(34px,5vw,61px);font-variant-numeric:tabular-nums}
#dashboard .range-body .widget-secondary{overflow-wrap:anywhere}
#dashboard .music-widget{align-items:flex-start!important;gap:9px!important}
#dashboard .music-widget .widget-primary{font-size:clamp(20px,2.8vw,36px)}
#dashboard .music-widget-mark{position:absolute;top:26px;right:28px;display:flex;height:24px;align-items:center;gap:3px;opacity:.3}
#dashboard .music-widget-mark>i{width:3px;height:6px;border-radius:99px;background:#c6373d}
#dashboard .music-widget.is-playing .music-widget-mark{opacity:.9}
#dashboard .music-widget.is-playing .music-widget-mark>i{animation:music-equalizer .72s ease-in-out infinite alternate}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(2){animation-delay:-.55s}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(3){animation-delay:-.18s}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(4){animation-delay:-.4s}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(5){animation-delay:-.25s}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(6){animation-delay:-.62s}
#dashboard .music-widget.is-playing .music-widget-mark>i:nth-child(7){animation-delay:-.1s}
:root[data-theme=dark] #dashboard .weather-reading>small,:root[data-theme=dark] #dashboard .weather-location-form>small,:root[data-theme=dark] #dashboard .sun-times>span small,:root[data-theme=dark] #dashboard .weather-footer,:root[data-theme=dark] #dashboard .weather-hour>span:first-child,:root[data-theme=dark] #dashboard .weather-hour>small{color:#c1c6ca}
:root[data-theme=dark] #dashboard .weather-location-form{background:rgba(38,40,43,.94);border-color:rgba(222,226,229,.18);color:#f5f6f7}
:root[data-theme=dark] #dashboard .weather-location-form input{background:rgba(55,58,61,.9);border-color:rgba(224,228,230,.2);color:#f7f8f8}
:root[data-theme=dark] #dashboard .compass-face{color:#f1f3f4}
:root[data-theme=dark] #dashboard .compass-face .compass-rim{fill:rgba(42,45,48,.7);stroke:rgba(221,225,227,.28)}
:root[data-theme=dark] #dashboard .compass-face text,:root[data-theme=dark] #dashboard .range-ring text{fill:#d1d5d7}
@keyframes weather-cloud-drift{0%,100%{transform:translateX(0)}50%{transform:translateX(3px)}}
@keyframes weather-sun-glow{0%,100%{transform:scale(1)}50%{transform:scale(1.035)}}
@keyframes weather-rain-fall{0%{stroke-dashoffset:0;transform:translateY(-2px)}100%{stroke-dashoffset:-21;transform:translateY(3px)}}
@keyframes weather-snow-drift{0%,100%{transform:translate(0,-1px);opacity:.78}50%{transform:translate(2px,3px);opacity:1}}
@keyframes navigation-flow{to{stroke-dashoffset:-24}}
@keyframes music-equalizer{from{height:5px}to{height:22px}}
@media(prefers-reduced-motion:reduce){#dashboard .weather-scene *,#dashboard .navigation-path>i,#dashboard .music-widget-mark>i{animation:none!important}#dashboard .sun-arc-progress,#dashboard .sun-arc-orb,#dashboard .compass-face #widget-compass-needle,#dashboard .weather-rain-rail>i,#dashboard .range-ring-value{transition-duration:0s!important}}
@media(max-width:720px){#dashboard .weather-location-form{inset:43px 8px 8px;padding:11px}#dashboard .weather-hours-grid{gap:3px}#dashboard .weather-hour>span:first-child{font-size:8px}#dashboard .range-ring{width:35%}#dashboard .apps-grid.widget-grid{grid-template-rows:repeat(5,minmax(0,1fr))}#dashboard .app-tile.widget-tile .widget-tile-symbol{width:25px;height:25px}#dashboard .app-tile.widget-tile .widget-tile-symbol svg{width:18px;height:18px}#dashboard .app-tile.widget-tile strong{font-size:8px}#dashboard .app-tile.widget-tile small{font-size:6px}}

/* A dock usa só ícones; o Launchpad mantém os nomes visíveis. */
#dashboard .dock-item>span:last-child{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#dashboard .apps-menu-heading strong,#dashboard .apps-page h3,#dashboard .apps-capability-note{display:none}
#dashboard .apps-menu-heading{height:26px;min-height:26px;margin:0 0 7px;justify-content:flex-end}
#dashboard .apps-page:not([hidden]){grid-template-rows:minmax(0,1fr);gap:0}
#dashboard .apps-grid.widget-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:5px;align-content:stretch;justify-items:center}
#dashboard .app-tile.widget-tile{width:min(100%,104px);height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:5px 3px;border:1px solid rgba(255,255,255,.55);border-radius:17px;background:rgba(255,255,255,.25);box-shadow:inset 0 1px rgba(255,255,255,.4),0 5px 15px rgba(40,45,50,.06)}
#dashboard .app-tile.widget-tile .widget-tile-symbol{width:42px;height:42px;flex:none;border-radius:14px}
#dashboard .app-tile.widget-tile .widget-tile-symbol svg{width:26px;height:26px}
#dashboard .app-tile.widget-tile strong{display:block;max-width:100%;font-size:9px;line-height:1.08;font-weight:550;white-space:normal;overflow-wrap:anywhere;text-align:center}
#dashboard .app-tile.widget-tile small,#dashboard .app-tile-open strong{display:none}
#dashboard .app-tile-open .app-tile-icon img{width:48px;height:48px;border-radius:14px}
#dashboard .apps-dock-hint{display:none}
:root[data-theme=dark] #dashboard .app-tile.widget-tile{background:rgba(68,70,74,.4);border-color:rgba(220,223,225,.2)}
#dashboard .dock .sprite-icon,#dashboard .dock .whatsapp-logo,#dashboard .dock .tesla-dock-mark{width:40px;height:40px;flex:none}
@media(max-width:720px){#dashboard .dock .sprite-icon,#dashboard .dock .whatsapp-logo,#dashboard .dock .tesla-dock-mark{width:40px;height:40px}}
/* No Launchpad, manter o nome de cada aplicação por baixo do ícone. */
#dashboard .apps-menu .app-tile-open strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:1.15;font-weight:500}
/* Acabamento do dock inferior para o ecrã escuro do Tesla. */
#dashboard[data-dock-position=bottom]>.footer-bar{isolation:isolate}
#dashboard[data-dock-position=bottom] .dock{transform:translateY(-7px);background:linear-gradient(180deg,rgba(248,249,250,.4),rgba(235,238,241,.24));-webkit-backdrop-filter:blur(14px) saturate(1.35);backdrop-filter:blur(14px) saturate(1.35);border:1px solid rgba(255,255,255,.52);box-shadow:0 4px 16px rgba(31,35,41,.12),inset 0 1px rgba(255,255,255,.58)}
#dashboard[data-dock-position=bottom] .dock-item{color:#454b51}
#dashboard[data-dock-position=bottom] .dock-item.active,#dashboard[data-dock-position=bottom] .dock-item:hover{background:rgba(255,255,255,.13)}
:root[data-theme=dark] #dashboard[data-dock-position=bottom] .dock{background:linear-gradient(180deg,rgba(41,43,45,.52),rgba(28,29,31,.38));border-color:rgba(208,211,213,.22);box-shadow:0 4px 16px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.12)}
:root[data-theme=dark] #dashboard[data-dock-position=bottom] .dock-item{color:#f2f3f4}
#dashboard .settings-dock-button{position:relative;flex:0 0 48px;width:48px;height:48px;min-width:48px;min-height:48px;padding:3px;border:0;border-radius:14px;background:transparent;color:inherit;display:grid;place-items:center}
#dashboard .settings-dock-button .settings-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#f8f8f8,#d5d7d9);box-shadow:inset 0 1px 2px #fff,0 2px 7px #0003;color:#6b6e72}
#dashboard .settings-icon svg{width:25px;height:25px;fill:currentColor}
#dashboard .settings-dock-button:hover,#dashboard .settings-dock-button[aria-expanded=true]{background:rgba(255,255,255,.16)}
#dashboard .settings-page{position:fixed;z-index:80;inset:12px;width:auto;max-height:none;overflow:auto;border-radius:24px;padding:24px clamp(14px,3vw,34px);background:linear-gradient(145deg,rgba(250,251,252,.76),rgba(239,242,245,.66));border:1px solid rgba(255,255,255,.75);box-shadow:0 20px 70px rgba(18,20,22,.3),inset 0 1px rgba(255,255,255,.7);-webkit-backdrop-filter:blur(28px) saturate(1.2);backdrop-filter:blur(28px) saturate(1.2)}
#dashboard .settings-page h2{font-size:24px;margin:5px 0 10px}
#dashboard .settings-page .connection-close{position:sticky;float:right;top:0;right:0;z-index:2;margin:-6px -8px 0 0;background:rgba(227,24,55,.1);color:#e31837;border-color:rgba(227,24,55,.24)}
@media(max-width:600px){#dashboard .settings-page{inset:7px;padding:18px 12px;border-radius:19px}}
:root[data-theme=dark] #dashboard .settings-page{background:linear-gradient(145deg,rgba(39,42,46,.8),rgba(24,27,30,.74));border-color:rgba(220,225,229,.2);color:#f6f7f8}
#dashboard .settings-display-options{margin:18px 0;padding:15px;border:1px solid rgba(125,130,135,.2);border-radius:16px;background:rgba(130,135,140,.07)}
#dashboard .settings-display-options h3{margin:0 0 12px;font-size:13px}
#dashboard .settings-page :is(.settings-display-options,.settings-wallpapers){background:linear-gradient(145deg,rgba(255,255,255,.48),rgba(247,249,251,.28));border:1px solid rgba(255,255,255,.62);box-shadow:inset 0 1px rgba(255,255,255,.66),0 6px 18px rgba(29,36,43,.05)}
#dashboard .settings-page :is(.settings-display-options,.settings-wallpapers) h3{font-size:14px;letter-spacing:-.1px}
:root[data-theme=dark] #dashboard .settings-page :is(.settings-display-options,.settings-wallpapers){background:linear-gradient(145deg,rgba(74,79,84,.42),rgba(40,44,48,.3));border-color:rgba(225,230,234,.18);box-shadow:inset 0 1px rgba(255,255,255,.1)}
#dashboard .settings-viewport-readout{display:block;margin:-4px 0 13px;color:var(--muted);font-size:11px;line-height:1.35}
#dashboard .settings-integration-heading{margin:22px 0 5px;font-size:15px;letter-spacing:-.2px}
#dashboard .settings-integration-summary{margin:0 0 12px;max-width:72ch;font-size:12px;line-height:1.45}
#dashboard .settings-page .connection-status-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0 17px}
#dashboard .settings-page .connection-status-list>div{min-height:56px;align-items:flex-start;padding:11px 13px;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.28);box-shadow:inset 0 1px rgba(255,255,255,.48)}
#dashboard .settings-page .connection-status-list strong{font-size:12px;line-height:1.35}
#dashboard .settings-page .connection-status-list small{font-size:11px;line-height:1.35;max-width:65%}
#dashboard .settings-page .connection-whatsapp-form{max-width:680px;padding:14px;border:1px solid rgba(255,255,255,.42);background:rgba(255,255,255,.2)}
#dashboard .settings-page .connection-whatsapp-form>strong{font-size:12px}
#dashboard .settings-page :is(input,button,a):focus-visible{outline:2px solid #b41c35;outline-offset:2px}
:root[data-theme=dark] #dashboard .settings-page .connection-status-list>div,:root[data-theme=dark] #dashboard .settings-page .connection-whatsapp-form{background:rgba(18,21,24,.34);border-color:rgba(220,225,229,.16)}
:root[data-theme=dark] #dashboard .settings-page label{color:#d1d5d8}
:root[data-theme=dark] #dashboard .settings-page input{background:rgba(53,57,61,.8);border:1px solid rgba(224,228,231,.22);color:#f5f6f7}
:root[data-theme=dark] #dashboard .settings-options-row .layout-button[aria-pressed=true]{background:rgba(227,94,113,.2);border-color:rgba(255,163,178,.35);color:#ffd2db}
@media(max-width:720px){#dashboard .settings-page .connection-status-list{grid-template-columns:1fr}#dashboard .settings-page .connection-status-list small{max-width:58%}}
#dashboard .settings-options-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
#dashboard .settings-options-row .theme-toggle{width:auto;height:42px;padding:0 14px;border-radius:14px;background:rgba(120,125,130,.14);border-color:rgba(120,125,130,.22);color:inherit;font-size:12px}
#dashboard .settings-options-row .theme-toggle span{display:inline-block}
#dashboard .settings-options-row .layout-controls{gap:8px;padding:0;border:0}

/* O Launchpad ocupa o ecrã de conteúdo; as aplicações ficam fora de vista enquanto o menu está aberto. */
#dashboard{position:relative}
#dashboard[data-launchpad-open=true] .workspace{visibility:hidden;pointer-events:none}

/* O Launchpad fica discreto na dock, mesmo aberto ou sob o cursor. */
#dashboard .launchpad-button,
#dashboard .launchpad-button:hover,
#dashboard .launchpad-button.active,
#dashboard .launchpad-button[aria-expanded=true],
:root[data-theme=dark] #dashboard .launchpad-button,
:root[data-theme=dark] #dashboard .launchpad-button:hover,
:root[data-theme=dark] #dashboard .launchpad-button.active,
:root[data-theme=dark] #dashboard .launchpad-button[aria-expanded=true]{
  background:transparent!important;
}
#dashboard .launchpad-button .sprite-apps svg{filter:drop-shadow(0 2px 3px rgba(32,47,61,.28))}
#dashboard .music-card::after{display:none}
#dashboard .music-card #music-state:not([hidden]){font-size:11px;padding:5px 10px}
#dashboard .music-card .music-control-note:empty{display:none}
#dashboard .dock-position-button{
  flex:0 0 30px!important;width:30px!important;min-width:30px!important;
  height:30px!important;opacity:1;padding:0;border-radius:9px;background:transparent!important;
  transition:none;box-shadow:none!important;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
#dashboard .dock-position-button:hover,#dashboard .dock-position-button:active,#dashboard .dock-position-button:focus-visible{opacity:1;background:transparent!important;outline:0!important;box-shadow:none!important}
#dashboard .dock-position-icon{width:30px!important;height:30px!important;background:transparent!important;color:currentColor;box-shadow:none}
#dashboard .dock-position-icon svg{display:block;width:30px;height:30px;fill:initial;stroke:initial;filter:drop-shadow(0 2px 3px rgba(32,47,61,.28))}
:root[data-theme=dark] #dashboard .dock-position-button{color:#f2f3f4}
#dashboard .apps-menu{
  position:absolute;z-index:60;top:14px;right:14px;bottom:72px;left:14px;
  width:auto;height:auto;max-height:none;transform:none;border-radius:25px;
  background:rgba(246,247,247,.94);box-shadow:0 14px 44px rgba(24,27,29,.24);
}
#dashboard[data-dock-position=left] .apps-menu{left:78px;bottom:14px}
:root[data-theme=dark] #dashboard .apps-menu{background:rgba(31,33,35,.94)}
#dashboard .app-settings-tile .settings-menu-open{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:2px;background:transparent;color:inherit}
#dashboard .app-settings-tile .settings-menu-open:hover{background:rgba(255,255,255,.16)}
#dashboard .app-settings-tile .settings-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,#f8f8f8,#d5d7d9);box-shadow:0 3px 10px #0002;color:#6b6e72}
#dashboard .app-settings-tile .settings-icon svg{width:25px;height:25px}
#dashboard .app-settings-tile strong{font-size:9px;font-weight:500;line-height:1.1}
:root[data-theme=dark] #dashboard .app-settings-tile .settings-icon{background:linear-gradient(145deg,#777a7d,#4a4d50);color:#f4f5f6}
:root[data-wallpaper=custom-color] .scene{background-image:linear-gradient(135deg,var(--wallpaper-custom-color,#78889b),color-mix(in srgb,var(--wallpaper-custom-color,#78889b) 34%,#101317));filter:blur(4px) saturate(1.12)}
:root[data-wallpaper=custom-photo] .scene{background-image:var(--wallpaper-custom-image,linear-gradient(135deg,#78889b,#252a31));background-position:center;background-size:cover;filter:blur(7px) saturate(.95)}
:root[data-wallpaper=custom-color] body::before,:root[data-wallpaper=custom-photo] body::before{background:linear-gradient(120deg,rgba(237,240,244,.1),rgba(255,255,255,.02) 48%,rgba(255,221,213,.08))}
#dashboard .apps-menu{background:linear-gradient(145deg,rgba(248,249,250,.34),rgba(235,238,241,.2));-webkit-backdrop-filter:blur(11px) saturate(1.35);backdrop-filter:blur(11px) saturate(1.35)}
:root[data-theme=dark] #dashboard .apps-menu{background:linear-gradient(145deg,rgba(41,43,45,.4),rgba(28,29,31,.28))}
#dashboard .apps-grid:not(.widget-grid):not(.apps-layout-grid){grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(70px,1fr));gap:8px 7px;align-content:center}
#dashboard .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open{width:100%;height:100%;min-height:70px;padding:8px 4px;border:1px solid rgba(255,255,255,.34);border-radius:17px;background:rgba(255,255,255,.2);box-shadow:inset 0 1px rgba(255,255,255,.38),0 4px 14px rgba(30,34,38,.06)}
:root[data-theme=dark] #dashboard .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open{border-color:rgba(255,255,255,.18);background:rgba(27,29,32,.25);box-shadow:inset 0 1px rgba(255,255,255,.12)}
#dashboard .apps-page-controls{height:34px;min-height:34px;margin:6px 0 0;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px}
#dashboard .apps-page-controls button{visibility:visible;width:30px;height:30px;border:1px solid rgba(120,126,132,.2);border-radius:50%;background:rgba(255,255,255,.36);color:inherit;font-size:22px;line-height:1;opacity:1}
#dashboard .apps-page-controls button:disabled{visibility:visible;opacity:.28;cursor:default}
#dashboard .apps-dock-hint{display:none}
.wallpaper-custom-color{display:flex;align-items:center;gap:10px;min-width:130px;padding:7px 10px;border:1px solid rgba(120,125,130,.2);border-radius:13px;background:rgba(255,255,255,.3);font-size:11px;cursor:pointer}
.wallpaper-custom-color input{width:38px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;cursor:pointer}
.wallpaper-photo{display:grid;place-items:center;background:linear-gradient(135deg,rgba(255,255,255,.2),rgba(100,110,120,.2));font-size:22px;color:#687078}
.wallpaper-custom-status{display:block;margin:8px 1px 0;color:var(--muted);font-size:10px}
#dashboard .settings-page #wallpaper-photo-input{position:absolute;width:1px;height:1px;padding:0;clip-path:inset(50%)}
:root[data-theme=dark] .wallpaper-custom-color{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.13)}
#dashboard .settings-options-row .layout-button{display:flex;align-items:center;gap:8px;width:auto;min-width:140px;height:42px;padding:7px 12px;border:1px solid rgba(120,125,130,.22);background:rgba(120,125,130,.12);color:inherit;font-size:11px}
#dashboard .settings-options-row .layout-button svg{width:23px;height:23px;flex:none}
#dashboard .settings-options-row .layout-button[aria-pressed=true]{background:rgba(227,24,55,.12);color:#cf1832}
#dashboard .settings-options-row .fullscreen-button{width:auto;min-width:140px;height:42px;padding:0 14px;border-radius:14px;background:rgba(120,125,130,.12);border-color:rgba(120,125,130,.22);color:inherit;font-size:11px}
#dashboard .settings-options-row .fullscreen-button #fullscreen-label{display:inline}
:root[data-theme=dark] #dashboard .settings-display-options{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}
.brand-mark.dashboard-monogram,.login-mark.dashboard-monogram{display:grid;place-items:center;background:linear-gradient(145deg,#303337,#111214);border:1px solid rgba(255,255,255,.18);color:#fff;font-size:11px;font-weight:800;letter-spacing:-.5px;text-shadow:0 1px 3px #0008}
#dashboard .car-loading-wordmark{display:flex;flex-direction:column;align-items:center;gap:3px;color:#fff;text-shadow:0 2px 9px rgba(0,0,0,.45);line-height:1}
#dashboard .car-loading-wordmark span{font-size:11px;font-weight:650;letter-spacing:.4px}
#dashboard .car-loading-wordmark strong{font-size:14px;font-weight:750;letter-spacing:-.5px}
.settings-wallpapers{margin:18px 0;padding:15px;border:1px solid rgba(125,130,135,.2);border-radius:16px;background:rgba(130,135,140,.07)}
.settings-wallpapers h3{margin:0 0 12px;font-size:13px}
.wallpaper-choices{display:flex;flex-wrap:wrap;gap:10px}
.wallpaper-choices button{display:grid;grid-template-columns:56px auto;align-items:center;gap:9px;min-width:130px;padding:7px 10px;border:1px solid rgba(120,125,130,.2);border-radius:13px;background:rgba(255,255,255,.3);color:inherit;font:inherit;font-size:11px;text-align:left;cursor:pointer}
.wallpaper-choices button[aria-pressed=true]{border-color:rgba(90,99,108,.64);box-shadow:0 0 0 2px rgba(90,99,108,.12);background:rgba(120,125,130,.12)}
.wallpaper-swatch{display:block;width:56px;height:36px;border:1px solid rgba(255,255,255,.35);border-radius:9px;box-shadow:inset 0 1px rgba(255,255,255,.25)}
.wallpaper-carplay{background:url('/carplay-reference.png?v=carplay-ios17-wallpaper-20261019') center/cover}
.wallpaper-aurora{background:radial-gradient(ellipse at 14% 20%,#4dcad1,transparent 48%),radial-gradient(ellipse at 82% 12%,#9676dd,transparent 46%),radial-gradient(ellipse at 70% 100%,#f182a4,transparent 48%),linear-gradient(135deg,#183b62,#28315d)}
.wallpaper-graphite{background:radial-gradient(ellipse at 18% 5%,#53585d,transparent 55%),linear-gradient(145deg,#282b2e,#0f1012)}
.wallpaper-mist{background:radial-gradient(ellipse at 18% 18%,#dcecff,transparent 50%),radial-gradient(ellipse at 82% 78%,#c2dce4,transparent 52%),linear-gradient(145deg,#a7bed0,#d7d5dc)}
.wallpaper-dawn{background:radial-gradient(ellipse at 16% 12%,#fff1de,transparent 48%),radial-gradient(ellipse at 84% 85%,#b4bfdc,transparent 52%),linear-gradient(145deg,#e0b9ba,#c6d3e7)}
:root[data-wallpaper=aurora] .scene{background-image:radial-gradient(ellipse at 14% 18%,#39bfc9 0%,transparent 38%),radial-gradient(ellipse at 82% 12%,#8167d2 0%,transparent 42%),radial-gradient(ellipse at 70% 92%,#e879a0 0%,transparent 46%),linear-gradient(135deg,#183b62,#28315d);filter:blur(38px) saturate(1.18)}
:root[data-wallpaper=graphite] .scene{background-image:radial-gradient(ellipse at 18% 5%,#53585d 0%,transparent 50%),linear-gradient(145deg,#282b2e,#0f1012);filter:blur(34px) saturate(.55)}
:root[data-wallpaper=mist] .scene{background-image:radial-gradient(ellipse at 18% 18%,#dcecff 0%,transparent 43%),radial-gradient(ellipse at 82% 78%,#c2dce4 0%,transparent 48%),linear-gradient(145deg,#a7bed0,#d7d5dc);filter:blur(28px) saturate(.9)}
:root[data-wallpaper=dawn] .scene{background-image:radial-gradient(ellipse at 16% 12%,#fff1de 0%,transparent 42%),radial-gradient(ellipse at 84% 85%,#b4bfdc 0%,transparent 49%),linear-gradient(145deg,#e0b9ba,#c6d3e7);filter:blur(28px) saturate(.86)}
:root[data-wallpaper=aurora] body::before{background:linear-gradient(120deg,rgba(240,245,255,.2),rgba(255,255,255,.03) 50%,rgba(255,231,239,.16))}
:root[data-wallpaper=graphite] body::before{background:linear-gradient(120deg,rgba(20,22,24,.25),rgba(12,13,14,.08) 50%,rgba(15,16,18,.3))}
:root[data-theme=dark][data-wallpaper=aurora] .scene{filter:blur(38px) saturate(1.05) brightness(.58)}
:root[data-theme=dark][data-wallpaper=graphite] .scene{filter:blur(34px) saturate(.45) brightness(.72)}
:root[data-theme=dark][data-wallpaper=mist] .scene,:root[data-theme=dark][data-wallpaper=dawn] .scene{filter:blur(28px) saturate(.72) brightness(.52)}
:root[data-theme=dark][data-wallpaper=aurora] body::before{background:linear-gradient(120deg,rgba(12,16,22,.68),rgba(15,16,18,.5) 50%,rgba(21,14,20,.68))}
:root[data-theme=dark][data-wallpaper=graphite] body::before{background:linear-gradient(120deg,rgba(6,7,8,.52),rgba(7,8,9,.32) 50%,rgba(5,6,7,.58))}
:root[data-theme=dark] .settings-wallpapers{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}
:root[data-theme=dark] .wallpaper-choices button{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.13)}
:root[data-theme=dark] .wallpaper-choices button[aria-pressed=true]{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.42)}
@media(max-width:600px){.wallpaper-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}.wallpaper-choices button{min-width:0}}
:root[data-wallpaper=carplay] .scene{filter:blur(20px) saturate(.78)}
:root[data-wallpaper=carplay] body::before{background:linear-gradient(115deg,rgba(237,238,238,.11),rgba(250,250,250,.04) 48%,rgba(255,221,213,.1)),radial-gradient(circle at 53% 8%,rgba(255,255,255,.12),transparent 36%)}
:root[data-wallpaper=custom-color] .wallpaper-custom-color{border-color:rgba(90,99,108,.64);box-shadow:0 0 0 2px rgba(90,99,108,.12)}

/* Vehicle modules reuse the dashboard's Tesla mark and material surface. */
.vehicle-control-widget{gap:14px;justify-content:center}.vehicle-widget-mark{width:40px;height:40px;object-fit:contain}.vehicle-control-widget .secondary-button{min-height:44px}.vehicle-control-widget.is-charging .vehicle-widget-mark{animation:vehicle-charge-breathe 2s ease-in-out infinite}@keyframes vehicle-charge-breathe{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.vehicle-control-widget.is-charging .vehicle-widget-mark{animation:none}}

/* Intelligent UI: compact agenda controls use the existing theme and real readings. */
.agenda-view-controls{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:8px 0 4px;min-width:0}
.agenda-view-controls select{font:inherit;font-size:12px;color:var(--ink);background:var(--glass);border:1px solid var(--line);border-radius:10px;padding:6px;min-width:0;max-width:68%;min-height:36px}
.agenda-view-count{font-size:11px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.agenda-view-more{border:0;background:transparent;color:var(--ink);font:inherit;font-size:12px;font-weight:600;min-height:36px;padding:6px 8px;border-radius:10px;cursor:pointer}
.agenda-view-more[hidden]{display:none}
.agenda-priority{flex:none;border:0;background:transparent;color:var(--muted);font-size:22px;min-width:36px;min-height:36px;border-radius:10px;cursor:pointer;transition:color .18s ease,background .18s ease}
.agenda-priority[aria-pressed="true"]{color:var(--ink);background:var(--glass)}
.agenda-filter-empty{font-size:12px;color:var(--muted);padding:12px 0}
.agenda-interactive .ios-list{min-height:0;overflow:auto;overscroll-behavior:contain}
.agenda-interactive .ios-calendar-row,.agenda-interactive .ios-reminder-row{flex-shrink:0}
.agenda-view-controls select:focus-visible,.agenda-priority:focus-visible,.agenda-view-more:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.agenda-priority{transition:none}}

#dashboard .agenda-interactive .ios-reminder-row{grid-template-columns:25px minmax(0,1fr) 36px}
.agenda-view-controls,.agenda-view-more{flex-shrink:0}
#dashboard[data-layout=unified] .info-card.agenda-interactive .ios-list{flex:1;min-height:0;max-height:none!important}

/* Vidro fumado no Launchpad: o wallpaper mantém a cor sem competir com os ícones. */
#dashboard #apps-menu{
  background:rgba(31,35,39,.78)!important;border:1px solid rgba(255,255,255,.2);
  box-shadow:0 18px 48px rgba(8,12,16,.24),inset 0 1px rgba(255,255,255,.1)!important;
  -webkit-backdrop-filter:blur(28px) saturate(.82)!important;backdrop-filter:blur(28px) saturate(.82)!important;
  color:#f5f7f9;
}
:root[data-theme=dark] #dashboard #apps-menu{background:rgba(19,23,27,.84)!important;border-color:rgba(255,255,255,.16)}
#dashboard #apps-menu::before{display:none!important}
#dashboard #apps-menu-body{touch-action:pan-y}
#dashboard #apps-menu .app-tile[data-app-id],
#dashboard #apps-menu .app-tile[data-widget-id]{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
#dashboard #apps-menu :is(h3,.app-tile-open,.app-layout-tile,.settings-menu-open,.apps-page-controls){color:#f5f7f9}
#dashboard #apps-menu .apps-capability-note{color:#c9d0d6}
#dashboard #apps-menu :is(.apps-page-controls button,.apps-menu-heading .round-button){
  width:44px;height:44px;min-width:44px;min-height:44px;flex:none;
  border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.07);color:#f5f7f9;
}
#dashboard #apps-menu .apps-menu-heading{height:44px;min-height:44px}
#dashboard #apps-menu .apps-page-controls{height:44px;min-height:44px}
#dashboard #apps-menu :is(.apps-page-controls button,.apps-menu-heading .round-button):hover{background:rgba(255,255,255,.15)}
#dashboard #apps-menu :is(.apps-page-controls button,.apps-menu-heading .round-button):focus-visible{outline:2px solid #eef5fa;outline-offset:2px}
#dashboard[data-launchpad-open=true] .workspace #car-model{display:none!important;visibility:hidden!important}
#dashboard[data-launchpad-open=true] .map-attribution{display:none!important}
#dashboard[data-launchpad-open=true] .maplibregl-ctrl-attrib{display:none!important}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid)>.app-tile:not(.widget-tile){
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid)>.app-tile:not(.widget-tile):hover,
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid)>.app-tile:not(.widget-tile):focus-within{
  background:transparent!important;box-shadow:none!important;
}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-icon{
  display:grid;width:76px;height:76px;flex:none;place-items:center;
}
#dashboard #apps-menu .apps-page-apps .apps-grid{width:86%;justify-self:center;gap:6px 3px}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open .app-tile-icon img{width:70px;height:70px;border-radius:16px;object-fit:cover}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-icon svg{display:block;width:70px;height:70px}
#dashboard .dock .sprite-icon>svg{display:block;width:100%;height:100%}
#dashboard #apps-menu .app-settings-tile .settings-icon{width:62px;height:62px;border-radius:17px}
#dashboard #apps-menu .app-settings-tile .settings-icon svg{width:36px;height:36px}
#dashboard #apps-menu .app-settings-tile .settings-icon{background:transparent;box-shadow:none;overflow:hidden}
#dashboard #apps-menu .app-settings-tile .settings-icon img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit;box-shadow:none}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open:hover{outline:none!important;background:transparent!important}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open:focus-visible{
  background:transparent!important;outline:2px solid rgba(255,255,255,.72);outline-offset:2px;
}
#dashboard #apps-menu .apps-grid:not(.widget-grid):not(.apps-layout-grid) .app-tile-open strong{
  display:block;max-width:100%;min-width:0;min-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;
  padding:3px 8px;border-radius:5px;background:rgba(20,24,28,.56);color:#fff;text-shadow:none;font-size:11px;line-height:1;
}

/* A abertura do Launchpad escurece a escolha guardada sem substituir o wallpaper. */
body:has(#dashboard[data-launchpad-open=true])::before{background:rgba(10,14,18,.2)!important}
body:has(#dashboard[data-launchpad-open=true]) .scene{filter:blur(18px) saturate(.72) brightness(.76)!important}
:root[data-theme=dark] body:has(#dashboard[data-launchpad-open=true]) .scene{filter:blur(18px) saturate(.65) brightness(.56)!important}

/* O badge do login acompanha o tema já resolvido pelo browser ou pela escolha guardada. */
#login .login-mark{display:grid;position:relative;width:50px;height:50px;margin-bottom:17px;background:transparent;border:0;box-shadow:none}
#login .login-mark img{grid-area:1/1;width:50px;height:50px;object-fit:contain}
#login .login-mark-dark{display:none}
:root[data-theme=dark] #login .login-mark-light{display:none}
:root[data-theme=dark] #login .login-mark-dark{display:block}

/* Loading inicial alinhado com o emblema: movimento contido e acento vermelho. */
#dashboard .dashboard-loading{background:rgba(245,246,247,.42);-webkit-backdrop-filter:blur(14px) saturate(.82);backdrop-filter:blur(14px) saturate(.82)}
:root[data-theme=dark] #dashboard .dashboard-loading{background:rgba(17,18,20,.48)}
#dashboard .dashboard-loading-content{display:grid;justify-items:center;gap:10px}
#dashboard .dashboard-loading-mark{position:relative;display:grid;place-items:center;width:88px;height:88px}
#dashboard .dashboard-loading-mark img{grid-area:1/1;width:42px;height:42px;object-fit:contain;border-radius:11px}
#dashboard .dashboard-loading-dark{display:none}
:root[data-theme=dark] #dashboard .dashboard-loading-light{display:none}
:root[data-theme=dark] #dashboard .dashboard-loading-dark{display:block}
#dashboard .dashboard-loading-ring{position:absolute;inset:0;width:88px;height:88px;fill:none;transform:rotate(-90deg);animation:dashboard-loading-turn 1.5s linear infinite}
#dashboard .dashboard-loading-track{stroke:rgba(107,107,107,.18);stroke-width:1.6}
#dashboard .dashboard-loading-progress{stroke:#E31837;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:42 210}
#dashboard .dashboard-loading-label{color:#6B6B6B;font-size:11px;font-weight:550;letter-spacing:.01em}
:root[data-theme=dark] #dashboard .dashboard-loading-label{color:#BABDC0}
@keyframes dashboard-loading-turn{to{transform:rotate(270deg)}}
@media(prefers-reduced-motion:reduce){#dashboard .dashboard-loading-ring{animation:none;transform:rotate(-20deg)}}

/* O indicador do Model Viewer mantém a animação aprovada e inverte o contraste por tema. */
#dashboard .car-loading{color:#17181A}
#dashboard .car-loading-face{background:rgba(255,255,255,.3);border:1px solid rgba(255,255,255,.55);box-shadow:inset 0 1px 1px rgba(255,255,255,.45),0 8px 28px rgba(73,77,80,.08)}
#dashboard .car-loading-dial{stroke:rgba(23,24,26,.18)}
#dashboard .car-loading-hand{stroke:currentColor}
:root[data-theme=dark] #dashboard .car-loading{color:#F7F7F8}
:root[data-theme=dark] #dashboard .car-loading-face{background:rgba(21,22,24,.42);border-color:rgba(247,247,248,.15);box-shadow:inset 0 1px 1px rgba(247,247,248,.08),0 8px 28px rgba(0,0,0,.18)}
:root[data-theme=dark] #dashboard .car-loading-dial{stroke:rgba(247,247,248,.2)}
:root[data-theme=dark] #dashboard .car-turntable.has-error #car-loading-message{color:#BABDC0}

/* Personalização do veículo: manter o vidro, reforçar leitura e evitar corte. */
#dashboard .car-card:has(#car-settings:not([hidden])){overflow:visible;z-index:15}
#dashboard .car-settings{box-sizing:border-box;width:min(280px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:min(72vh,520px);max-height:min(72dvh,520px);overscroll-behavior:contain;background:rgba(250,250,251,.97);color:#17181A}
#dashboard .car-settings-heading,#dashboard .car-settings-heading strong{color:#17181A}
#dashboard .car-settings-heading button{color:#52585e}
#dashboard .car-settings label,#dashboard .car-settings-label{color:#454b51}
#dashboard .car-settings small{color:#5c6268}
:root[data-theme=dark] #dashboard .car-settings{background:rgba(30,32,34,.97);color:#F7F7F8}
:root[data-theme=dark] #dashboard .car-settings-heading,:root[data-theme=dark] #dashboard .car-settings-heading strong{color:#F7F7F8}
:root[data-theme=dark] #dashboard .car-settings-heading button{color:#D0D3D5}
:root[data-theme=dark] #dashboard .car-settings label,:root[data-theme=dark] #dashboard .car-settings-label{color:#F0F1F2}
:root[data-theme=dark] #dashboard .car-settings small{color:#C2C5C8}
@media(max-width:700px){
  #dashboard .settings-page .theme-control{position:static}
  #dashboard .settings-page .theme-menu{position:fixed;top:12px;left:12px;right:12px;width:auto;max-width:320px;margin-inline:auto;z-index:100}
}

/* Agenda compacta: filtros junto ao refresh; espaço reduzido fica para os conteúdos. */
#dashboard .calendar-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;flex:none}
#dashboard .calendar-heading-actions .agenda-view-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin:0;min-width:0}
#dashboard .calendar-heading-actions .agenda-view-controls select{width:auto;max-width:136px;min-height:32px;padding:5px 25px 5px 9px;border-radius:11px;font-size:10px}
#dashboard .calendar-heading-actions .agenda-view-count{font-size:9px}
#dashboard .calendar-refresh{display:grid;place-items:center;width:34px;height:34px;flex:none;padding:0;border:1px solid rgba(255,255,255,.68);border-radius:12px;background:rgba(255,255,255,.44);color:#4e555b;font-size:0;line-height:1;box-shadow:inset 0 1px rgba(255,255,255,.72),0 2px 7px rgba(35,39,42,.08);cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}
#dashboard .calendar-refresh svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;transition:transform .35s ease}
#dashboard .calendar-refresh:not(:disabled):hover{background:rgba(255,255,255,.72);border-color:rgba(255,255,255,.9);transform:translateY(-1px)}
#dashboard .calendar-refresh:not(:disabled):hover svg{transform:rotate(35deg)}
#dashboard .calendar-refresh:disabled{opacity:.68;cursor:wait}
#dashboard .calendar-refresh:disabled svg{animation:agenda-refresh-turn .9s linear infinite}
@keyframes agenda-refresh-turn{to{transform:rotate(360deg)}}
:root[data-theme=dark] #dashboard .calendar-refresh{background:rgba(50,53,56,.48);border-color:rgba(225,228,230,.2);color:#eff1f2;box-shadow:inset 0 1px rgba(255,255,255,.1),0 2px 8px rgba(0,0,0,.12)}
:root[data-theme=dark] #dashboard .calendar-refresh:not(:disabled):hover{background:rgba(75,78,81,.66);border-color:rgba(225,228,230,.32)}
:root[data-theme=dark] #dashboard .calendar-heading-actions .agenda-view-controls select{background:rgba(48,50,53,.58);border-color:rgba(225,228,230,.2);color:#f1f2f3}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .calendar-heading-actions{gap:4px}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .calendar-heading-actions .agenda-view-controls select{max-width:112px;min-height:30px;padding-inline:7px;font-size:9px}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .calendar-heading-actions .agenda-view-count{display:none}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .card-focus{width:32px;height:32px}
#dashboard[data-layout=unified] .info-card[data-narrow=true] .sprite-icon{width:32px;height:32px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .card-topline{justify-content:flex-start;gap:6px;padding-right:0!important;margin-bottom:0}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .section-title{display:flex!important;flex:1;min-width:0;gap:6px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .section-title h2{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .card-focus{width:32px;height:32px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .sprite-icon{width:28px;height:28px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .card-arrange,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .calendar-heading-actions .agenda-view-controls,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-list-footer,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .agenda-view-more{display:none!important}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .section-title{display:none!important}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-list{flex:1;min-height:0;margin-top:8px;overflow:auto}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-calendar-row,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-reminder-row{min-height:46px;padding:5px 8px}
#dashboard[data-layout=unified] #reminders-card[data-agenda-compact=true] .card-topline{display:none!important}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .card-topline{display:none!important}
#dashboard[data-layout=unified] #reminders-card[data-agenda-compact=true] .ios-list{margin-top:8px}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-list{margin-top:8px}
/* Em frames compactos, cada linha cresce e quebra texto; a lista faz scroll sem truncar eventos. */
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-calendar-row,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-reminder-row{height:auto;align-items:start;overflow:visible}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-calendar-row .calendar-line{height:100%;min-height:34px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-calendar-row time{padding-top:2px}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-row-copy strong,
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-row-copy small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
#dashboard[data-layout=unified] .info-card[data-agenda-compact=true] .ios-row-copy{min-width:0;overflow:visible}
@media(prefers-reduced-motion:reduce){#dashboard .calendar-refresh,#dashboard .calendar-refresh svg{transition:none}#dashboard .calendar-refresh:disabled svg{animation:none}}

/* O frame identifica widgets; a superfície interior dá leitura ao símbolo e ao nome. */
#dashboard .app-tile.widget-tile{
  background:rgba(246,248,250,.76);border-color:rgba(255,255,255,.82);
  box-shadow:inset 0 1px rgba(255,255,255,.74),0 3px 9px rgba(28,37,46,.12);
  color:#27323b;
}
#dashboard .app-tile.widget-tile .widget-tile-symbol{
  background:rgba(255,255,255,.86);box-shadow:inset 0 1px rgba(255,255,255,.88),0 1px 3px rgba(28,37,46,.12);
  font-weight:600;
}
#dashboard .app-tile.widget-tile strong{font-size:10px;font-weight:700;line-height:1.12}
:root[data-theme=dark] #dashboard .app-tile.widget-tile{
  background:rgba(36,42,48,.78);border-color:rgba(226,236,242,.52);color:#f2f5f7;
}
:root[data-theme=dark] #dashboard .app-tile.widget-tile .widget-tile-symbol{background:rgba(235,241,245,.88);color:#27323b}

/* No cartão estreito, a data ocupa o canto; o título tem até três linhas. */
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-calendar-row{
  grid-template-columns:4px minmax(0,1fr) auto;grid-template-areas:"line copy date";gap:6px;align-items:start;
}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .calendar-line{grid-area:line}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] time{
  grid-area:date;padding-top:2px;font-size:9px;white-space:nowrap;text-align:right;
}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-row-copy{grid-area:copy;min-width:0;overflow:hidden}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-row-copy strong{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;
  white-space:normal;overflow-wrap:anywhere;text-overflow:clip;font-size:12px;line-height:1.25;
}
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-row-copy small,
#dashboard[data-layout=unified] #calendar-card[data-agenda-compact=true] .ios-chevron{display:none}

#dashboard .dock-position-icon svg{filter:none}

/* O tema resolvido aplica-se também às superfícies específicas do layout do carro. */
:root[data-theme=dark] #dashboard[data-layout=unified] .workspace>.car-card:not([hidden]){
  background:linear-gradient(150deg,rgba(41,43,45,.78),rgba(28,29,31,.7));
  border-color:rgba(208,211,213,.19);
  box-shadow:0 18px 42px rgba(8,8,8,.34),inset 0 1px rgba(255,255,255,.1);
  color:#f7f7f8;
}
:root[data-theme=dark] #dashboard[data-layout=unified] .workspace>.dashboard-widget:not([hidden]){
  background:linear-gradient(145deg,rgba(41,43,45,.68),rgba(28,29,31,.52));
  border-color:rgba(208,211,213,.19);color:#f7f7f8;
}
:root[data-theme=dark] #dashboard .info-card .ios-list{
  background:rgba(20,21,23,.24);
}
:root[data-theme=dark] #dashboard .info-card :is(.ios-calendar-row,.ios-reminder-row){background:transparent}
:root[data-theme=dark] #dashboard #map-card .map-switch button{color:#e6e8e9}
:root[data-theme=dark] #dashboard #map-card .map-switch button[aria-pressed=true]{
  background:rgba(70,74,78,.78);color:#fff;box-shadow:inset 0 1px rgba(255,255,255,.12);
}
:root[data-theme=dark] #dashboard #map-card .map-orientation{color:#e6e8e9}
:root[data-theme=dark] #dashboard #map-card .map-orientation[aria-pressed=true]{
  background:rgba(70,74,78,.78);color:#ff7587;box-shadow:inset 0 1px rgba(255,255,255,.12);
}
:root[data-theme=dark] #dashboard[data-layout=unified] #map-card[data-wide=false] .map-top-controls>.map-search.map-search-route-ready>.map-reset-compact{
  background:rgba(50,53,56,.86);border-color:rgba(225,228,230,.2);color:#ff7587;
}
:root[data-theme=dark] #live-map .maplibregl-ctrl-attrib{background:rgba(30,33,36,.78);color:#e6e8e9}

/* Controlos da Dock: dois alvos iguais, separados dos atalhos e entre si. */
#dashboard .dock #apps-menu-button,
#dashboard .dock #dock-position-toggle{
  position:relative;flex:0 0 46px!important;width:46px!important;min-width:46px!important;
  height:46px!important;min-height:46px!important;padding:9px!important;align-self:center;
  border:1px solid rgba(255,255,255,.7)!important;border-radius:15px!important;
  background:rgba(248,251,253,.3)!important;color:#34414b;
  -webkit-backdrop-filter:blur(18px) saturate(.9);backdrop-filter:blur(18px) saturate(.9);
  box-shadow:inset 0 1px rgba(255,255,255,.62),0 3px 9px rgba(24,31,38,.09)!important;
  opacity:1;touch-action:manipulation;transition:background .18s ease,transform .18s ease;
}
#dashboard .dock #apps-menu-button{margin:0 0 0 14px}
#dashboard .dock #dock-position-toggle{margin:0 0 0 10px}
#dashboard .dock #apps-menu-button:hover,
#dashboard .dock #apps-menu-button[aria-expanded=true],
#dashboard .dock #dock-position-toggle:hover{
  background:rgba(255,255,255,.56)!important;
}
#dashboard .dock :is(#apps-menu-button,#dock-position-toggle):active{transform:scale(.94);background:rgba(255,255,255,.72)!important}
#dashboard .dock :is(#apps-menu-button,#dock-position-toggle):focus-visible{outline:2px solid #34414b!important;outline-offset:2px}
#dashboard .dock #apps-menu-button .sprite-apps,
#dashboard .dock #dock-position-toggle .dock-position-icon{
  display:grid;place-items:center;width:26px!important;height:26px!important;
  border-radius:0!important;background:transparent!important;color:inherit;box-shadow:none!important;
}
#dashboard .dock #apps-menu-button .sprite-apps svg,
#dashboard .dock #dock-position-toggle .dock-position-icon svg{
  display:block;width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.75;filter:none;
}
#dashboard .dock #dock-position-toggle .dock-layout-left{display:none}
#dashboard .dock #dock-position-toggle[data-position=left] .dock-layout-left{display:block}
#dashboard .dock #dock-position-toggle[data-position=left] .dock-layout-bottom{display:none}
:root[data-theme=dark] #dashboard .dock :is(#apps-menu-button,#dock-position-toggle){
  border-color:rgba(239,245,249,.28)!important;background:rgba(235,243,249,.08)!important;color:#eef4f8;
  box-shadow:inset 0 1px rgba(255,255,255,.13),0 3px 9px rgba(0,0,0,.12)!important;
}
:root[data-theme=dark] #dashboard .dock :is(#apps-menu-button,#dock-position-toggle):hover,
:root[data-theme=dark] #dashboard .dock #apps-menu-button[aria-expanded=true]{background:rgba(235,243,249,.18)!important}
:root[data-theme=dark] #dashboard .dock :is(#apps-menu-button,#dock-position-toggle):active{background:rgba(235,243,249,.26)!important}
:root[data-theme=dark] #dashboard .dock :is(#apps-menu-button,#dock-position-toggle):focus-visible{outline-color:#eef4f8!important}
@media(min-width:481px){
  #dashboard[data-dock-position=left] .dock #apps-menu-button{margin:14px 0 0}
  #dashboard[data-dock-position=left] .dock #dock-position-toggle{margin:10px 0 0}
}
@media(prefers-reduced-motion:reduce){#dashboard .dock :is(#apps-menu-button,#dock-position-toggle){transition:none}}

/* Indicadores de página com área de toque. */
#dashboard .apps-menu{touch-action:pan-y}
#dashboard .workspace>:not(#map-card):not(#vehicle-card){touch-action:pan-y}
#dashboard[data-dashboard-page=dashboard][data-layout-mode=split] :is(#map-card,#vehicle-card){touch-action:none}
#dashboard[data-layout-mode=solo] #vehicle-card{touch-action:pan-y}
#dashboard{position:relative}
#dashboard .dashboard-pages{
  display:flex;flex:none;align-self:center;justify-content:center;gap:3px;
  max-width:100%;padding:2px;border-radius:999px;z-index:65;
  background:rgba(35,42,57,.42);color:#fff;
  border:1px solid rgba(255,255,255,.48);
  box-shadow:inset 0 1px rgba(255,255,255,.16);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
#dashboard .dashboard-pages>[data-dashboard-page]{
  display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;
  background:transparent;color:inherit;cursor:pointer;touch-action:manipulation;
}
#dashboard .dashboard-pages>[data-dashboard-page]::before{
  content:"";width:7px;height:7px;border-radius:999px;background:currentColor;opacity:.7;
  transition:width .18s ease,opacity .18s ease;
}
#dashboard .dashboard-pages>[data-dashboard-page]:hover{background:rgba(255,255,255,.16)}
#dashboard .dashboard-pages>[data-dashboard-page]:focus-visible{outline:2px solid #fff;outline-offset:-3px}
#dashboard .dashboard-pages>[aria-current=page]::before{width:17px;opacity:1}
#dashboard[data-launchpad-open=true] .apps-menu{bottom:124px}
@media(min-width:481px){
  #dashboard[data-dock-position=left]>.workspace{margin-bottom:58px}
  #dashboard[data-dock-position=left] .dashboard-pages{position:absolute;bottom:14px;left:calc(50% + 36px);transform:translateX(-50%);margin:0}
  #dashboard[data-dock-position=left][data-launchpad-open=true] .apps-menu{bottom:72px}
}
#dashboard .workspace[data-page-transition=next]{animation:dashboard-page-next .22s ease-out both}
#dashboard .workspace[data-page-transition=previous]{animation:dashboard-page-previous .22s ease-out both}
@keyframes dashboard-page-next{from{opacity:.5;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}
@keyframes dashboard-page-previous{from{opacity:.5;transform:translateX(-18px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){
  #dashboard .dashboard-pages>[data-dashboard-page]::before{transition:none}
  #dashboard .workspace[data-page-transition]{animation:none}
}

/* A previsão diária partilha o cartão de meteorologia e mantém três linhas legíveis. */
#dashboard .weather-widget .weather-main{min-height:min-content}
#dashboard .weather-widget[data-compact=true]{gap:6px!important;overflow-y:auto}
#dashboard .weather-widget[data-compact=true] .weather-scene{max-width:58px}
#dashboard .weather-widget[data-compact=true] .weather-reading>strong{font-size:28px}
#dashboard .weather-days{display:grid;flex:none;gap:0;min-width:0;width:100%;margin-top:auto;border-top:1px solid rgba(95,109,121,.16)}
#dashboard .weather-day{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);align-items:center;gap:6px;min-width:0;min-height:34px;padding:8px 1px;border-bottom:1px solid rgba(95,109,121,.12);font-size:11px;line-height:1.25}
#dashboard .weather-day-label{min-width:0;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
#dashboard .weather-day>.weather-condition-icon{justify-self:center;color:#f5f9ff;filter:drop-shadow(0 1px 1px rgba(16,25,42,.75))}
#dashboard .weather-day-temperatures{display:flex;align-items:baseline;justify-content:flex-end;gap:clamp(3px,calc(var(--card-w, 260px) * .02),8px);white-space:nowrap;font-variant-numeric:tabular-nums}
#dashboard .weather-day-temperatures strong{font-size:12px;font-weight:650}
#dashboard .weather-day-temperatures small{font-size:11px;color:var(--muted)}
#dashboard .weather-days-empty{padding:14px 0;font-size:11px;line-height:1.4;color:var(--muted)}
:root[data-theme=dark] #dashboard .weather-days{border-color:rgba(228,237,244,.16)}
:root[data-theme=dark] #dashboard .weather-day{border-color:rgba(228,237,244,.1)}
:root[data-theme=dark] #dashboard :is(.weather-day-temperatures small,.weather-days-empty){color:#bec7cf}
#dashboard .weather-widget[data-narrow=true] .weather-day{gap:5px;font-size:10px}
#dashboard .weather-widget[data-compact=true] .weather-day{min-height:30px;padding-block:5px}
@media(min-width:721px){
  #dashboard[data-dashboard-page=widgets] .analog-clock-face{width:min(84%,360px);max-height:70%;flex-shrink:1}
  #dashboard[data-dashboard-page=widgets] .weather-widget:not([data-narrow=true]):not([data-compact=true]) .weather-day{min-height:42px;font-size:14px;gap:10px}
  #dashboard[data-dashboard-page=widgets] .weather-widget:not([data-narrow=true]) .weather-day-temperatures strong{font-size:16px}
  #dashboard[data-dashboard-page=widgets] .weather-widget:not([data-narrow=true]) .weather-day-temperatures small{font-size:14px}
  #dashboard[data-dashboard-page=widgets] :is(.weather-footer,.weather-reading>small){font-size:12px}
}

/* Toque prolongado: editar a Dock sem apagar a aplicação do Launchpad. */
#dashboard .dock .dock-item[data-app-id]{position:relative}
#dashboard .dock-remove-badge{display:none;position:absolute;z-index:3;top:-3px;right:0;width:20px;height:20px;
  align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.84);border-radius:50%;
  background:rgba(54,58,63,.88);color:#fff;font-size:16px;font-weight:500;line-height:1;
  box-shadow:0 2px 7px rgba(0,0,0,.27);cursor:pointer;touch-action:manipulation}
#dashboard.dock-editing .dock .dock-item[data-app-id]:not([hidden]) .dock-remove-badge{display:flex}
#dashboard.dock-editing .dock .dock-item[data-app-id]:not([hidden])>.sprite-icon,
#dashboard.dock-editing .dock .dock-item[data-app-id]:not([hidden])>.whatsapp-logo,
#dashboard.dock-editing .dock .dock-item[data-app-id]:not([hidden])>.tesla-dock-mark,
#dashboard.dock-editing .apps-menu .app-tile-icon{animation:dock-jiggle .24s ease-in-out infinite alternate}
#dashboard.dock-editing .dock .dock-item[data-app-id]:nth-child(even)>.sprite-icon,
#dashboard.dock-editing .apps-menu .app-tile:nth-child(even) .app-tile-icon{animation-direction:alternate-reverse}
@keyframes dock-jiggle{from{transform:rotate(-2deg)}to{transform:rotate(2deg)}}
@media(prefers-reduced-motion:reduce){#dashboard.dock-editing .dock .dock-item[data-app-id]>.sprite-icon,
  #dashboard.dock-editing .dock .dock-item[data-app-id]>.whatsapp-logo,
  #dashboard.dock-editing .dock .dock-item[data-app-id]>.tesla-dock-mark,
  #dashboard.dock-editing .apps-menu .app-tile-icon{animation:none}}

/* A ligação ao iPhone tem um percurso próprio e estados independentes da localização. */
#dashboard .bridge-setup{margin:18px 0 22px;padding:20px;border:1px solid rgba(255,255,255,.75);border-radius:20px;background:linear-gradient(130deg,rgba(255,255,255,.7),rgba(245,248,251,.46));box-shadow:inset 0 1px rgba(255,255,255,.8),0 8px 28px rgba(29,36,43,.06)}
.bridge-setup-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.bridge-setup-heading>div{flex:1;min-width:180px}
.bridge-phone-symbol{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#191c20;color:white;font-size:28px}
#dashboard .bridge-setup h3{margin:4px 0 0;font-size:20px;letter-spacing:-.55px;line-height:1.2}
#dashboard .bridge-setup>p{max-width:78ch;font-size:13px;line-height:1.5;color:#4b5259}
.bridge-ready-badge{flex:none;display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:20px;background:rgba(125,130,138,.12);color:#545c65;font-size:11px;font-weight:700;white-space:nowrap}
.bridge-ready-badge:before{content:'';width:6px;height:6px;border-radius:50%;background:#8b9097}.bridge-ready-badge[data-state=ready]{background:rgba(30,139,91,.1);color:#126b42}.bridge-ready-badge[data-state=ready]:before{background:#238853}
.bridge-checks{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:14px;margin:20px 0}.bridge-checks>div{display:flex;align-items:flex-start;gap:9px}.bridge-checks strong{display:block;font-size:12px}.bridge-checks small{display:block;margin-top:5px;font-size:12px;line-height:1.45;overflow-wrap:anywhere;color:#626a73}
.bridge-check-dot{display:block;flex:none;width:8px;height:8px;margin-top:4px;border-radius:50%;background:#a5abb1}.bridge-check-dot[data-state=ready]{background:#248c5c;box-shadow:0 0 0 3px rgba(36,140,92,.1)}
.bridge-setup-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.bridge-setup-actions :is(button,a){min-height:44px;padding:11px 15px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-size:12px;border-radius:12px}
#dashboard .bridge-setup .bridge-command-status{padding:12px 14px;max-width:none;border-radius:12px;background:rgba(110,124,139,.08);font-size:12px;line-height:1.5;color:inherit}
#dashboard .bridge-setup>small{display:block;font-size:11px;line-height:1.5;max-width:100ch;color:#69727c}
#dashboard .iphone-header-status[data-state=ready]{color:inherit}
:root[data-theme=dark] #dashboard .bridge-setup{background:linear-gradient(135deg,rgba(69,77,86,.5),rgba(35,41,47,.44));border-color:rgba(225,230,234,.2);box-shadow:inset 0 1px rgba(255,255,255,.08)}
:root[data-theme=dark] #dashboard .bridge-setup :is(p,small){color:#c5cbd1}:root[data-theme=dark] .bridge-ready-badge{color:#c5cbd1}:root[data-theme=dark] .bridge-ready-badge[data-state=ready]{background:rgba(42,186,118,.16);color:#9ce3bf}
@media(max-width:800px){.bridge-checks{grid-template-columns:1fr;gap:15px}#dashboard .bridge-setup{padding:16px}.bridge-setup-heading{gap:10px}#dashboard .bridge-setup h3{font-size:18px}.bridge-setup-actions{align-items:stretch}.bridge-setup-actions>a{flex-basis:100%}.bridge-setup-actions>button{flex:1}}

/* A página do iPhone prioriza a app nativa e guarda as ferramentas opcionais em detalhes. */
.phone-page{background:radial-gradient(ellipse at 0 0,#fff 0,transparent 65%),linear-gradient(155deg,#edf0f4,#dfe5ec);background-attachment:fixed;color:#1d252e;padding:24px 16px max(24px,env(safe-area-inset-bottom));font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display",Inter,sans-serif}
.phone-page .phone-card{max-width:560px;padding:26px 26px 18px;border-radius:28px;background:rgba(255,255,255,.65);border:1px solid rgba(255,255,255,.95);box-shadow:0 20px 70px #1f30451a;backdrop-filter:blur(24px)}
.phone-header{display:flex;align-items:center;gap:10px}.phone-header .phone-brand-mark{margin:0;width:42px;height:42px;border-radius:12px}.phone-header>span{flex:1;font-size:11px;font-weight:800;letter-spacing:1px}.phone-header small{display:block;margin-top:4px;font-size:8px;font-weight:600;letter-spacing:1.8px;color:#79838f}.phone-header>a{display:grid;place-items:center;width:44px;height:44px;font-size:25px;color:inherit;text-decoration:none;border-radius:12px;background:#e6ebf0}
.phone-intro{margin:32px 0 26px}.phone-intro .eyebrow{font-size:9px;letter-spacing:1.4px;color:#73808e}.phone-card .phone-intro h1{margin:10px 0 12px;font-size:clamp(30px,8vw,39px);line-height:1.08;letter-spacing:-1.4px;font-weight:700}.phone-card .phone-intro>p:last-child{font-size:14px;line-height:1.5;max-width:32ch;color:#6b7683}
.phone-native-card,.phone-shortcut-card,.phone-car-link{padding:18px 0;border-top:1px solid rgba(68,84,103,.12)}.phone-section-heading{display:flex;align-items:center;gap:9px}.phone-section-heading h2{flex:1;font-size:15px;margin:0;font-weight:700;letter-spacing:-.2px}.phone-step{display:grid;place-items:center;flex:none;width:23px;height:23px;border-radius:8px;background:#202a36;color:#fff;font-size:11px;font-weight:700}.phone-section-heading .bridge-ready-badge{font-size:10px;padding:6px 8px}
.phone-page .phone-card p{font-size:13px;line-height:1.55}.phone-page .phone-card .phone-help{color:#6b7581;font-size:12px;line-height:1.6}.phone-native-open{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;border-radius:13px;padding:14px 15px;text-decoration:none;font-size:13px;background:#1d2835;color:#fff}.phone-native-open>span{font-size:19px}.phone-page .phone-card :is(.primary-button,.secondary-button){min-height:44px;font-size:12px;border-radius:12px;white-space:normal}.phone-page .phone-card .secondary-button{border:1px solid rgba(80,97,118,.15);background:rgba(255,255,255,.6);color:#344456;padding:10px 13px}.phone-page .phone-card :is(button,a,input,summary):focus-visible{outline:3px solid #6286b2;outline-offset:3px}.phone-page .phone-card input{font-size:16px;background:rgba(255,255,255,.78);border-color:#c8d2de;color:#172534}
.phone-manual-setup{margin-top:13px}.phone-manual-setup summary{font-size:12px;line-height:1.5;color:#536376;padding:8px 0;min-height:38px;cursor:pointer}.phone-manual-setup label{font-size:11px;color:#677382}.phone-card .phone-last-command{border-radius:12px;padding:12px;background:rgba(84,104,130,.07);font-size:12px;color:#536376}.phone-url{display:block;padding:12px 13px;margin:12px 0;border:1px solid rgba(80,97,118,.12);border-radius:12px;overflow-wrap:anywhere;background:rgba(255,255,255,.6);font-size:13px;line-height:1.5;color:#3a4c62}
.phone-extra{border-top:1px solid rgba(68,84,103,.12)}.phone-extra>summary{min-height:55px;padding:16px 0;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:650;cursor:pointer;list-style:none}.phone-extra>summary:after{content:'+';font-size:20px;font-weight:400;color:#6b7889}.phone-extra[open]>summary:after{content:'−'}.phone-extra>summary>span{margin-left:auto;font-size:8px;font-weight:600;letter-spacing:.6px;color:#7e8996}.phone-extra[open]{padding-bottom:18px}.phone-return-link{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding-top:8px;color:#344a64;font-size:13px;text-decoration:none;border-top:1px solid rgba(68,84,103,.12)}
.phone-card #phone-feedback{font-size:12px;line-height:1.5;color:#334d6a;overflow-wrap:anywhere}.phone-card #phone-feedback:empty{display:none}.phone-footer{display:flex;justify-content:space-between;gap:10px;padding-top:20px;margin-top:8px;border-top:1px solid rgba(68,84,103,.1);font-size:8px;font-weight:650;letter-spacing:1px;color:#83909f}.phone-footer>span{font-weight:500;letter-spacing:0}
@media(max-width:380px){.phone-page{padding:12px 9px}.phone-page .phone-card{padding:20px 18px 16px}.phone-section-heading{flex-wrap:wrap}.phone-intro{margin-top:26px}}
@media(prefers-reduced-transparency:reduce){.phone-page .phone-card{background:#f4f6f8;backdrop-filter:none}#dashboard .bridge-setup{background:#eef1f4}}

.phone-page .phone-shortcut-install{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;text-decoration:none}

/* A coluna do zoom já reserva espaço na grelha. O campo e as ações usam a largura restante. */
#dashboard #map-card .map-top-controls>.map-search input {
  font-size:14px;
}
#dashboard #map-card .map-top-controls>.map-search>button:not(.map-reset-compact) {
  padding-inline:10px;
  font-size:13px;
  line-height:1.2;
}
#dashboard #map-card .map-switch button {
  min-height:34px;
  padding-inline:8px;
  font-size:12px;
}
#dashboard #map-card .map-switch button[aria-pressed=true] {
  font-weight:750;
}
#dashboard #map-card :is(input,button):focus-visible {
  outline:2px solid #47799f;
  outline-offset:2px;
}
:root[data-theme=dark] #dashboard #map-card :is(input,button):focus-visible {
  outline-color:#a8d8ff;
}
.phone-card .phone-waze-link {
  background:var(--navigation-blue);
  border-color:var(--navigation-blue);
  color:var(--navigation-ink);
}
.phone-card .phone-waze-link:not([hidden]) {
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 14px;
  margin:12px 0;
  border-radius:14px;
  font-weight:750;
  overflow-wrap:anywhere;
  text-decoration:none;
}
@media(max-width:720px) {
  #dashboard #map-card .map-top-controls>.map-search input {font-size:16px}
}

/* O leitor dá destaque à capa quando chega e mantém os controlos no mesmo cartão em todos os estados. */
#dashboard #music-card {
  background:
    radial-gradient(ellipse at 19% 2%,rgba(233,106,141,.20),transparent 47%),
    linear-gradient(158deg,rgba(253,252,253,.94),rgba(224,232,238,.74));
  border-color:rgba(255,255,255,.65);
}
:root[data-theme=dark] #dashboard #music-card {
  background:
    radial-gradient(ellipse at 16% 2%,rgba(164,67,97,.26),transparent 50%),
    linear-gradient(158deg,rgba(39,38,48,.94),rgba(26,39,46,.88));
  border-color:rgba(231,233,238,.24);
}
#dashboard #music-card .album-art.is-placeholder {
  background:
    radial-gradient(circle at 32% 19%,rgba(217,98,130,.35),transparent 55%),
    linear-gradient(145deg,#e3d5e0,#c0cbd8);
  box-shadow:0 11px 26px rgba(43,28,52,.17),inset 0 1px rgba(255,255,255,.7);
}
:root[data-theme=dark] #dashboard #music-card .album-art.is-placeholder {
  background:
    radial-gradient(circle at 32% 19%,rgba(171,69,104,.41),transparent 55%),
    linear-gradient(145deg,#3e354b,#263a49);
  box-shadow:0 11px 26px rgba(4,9,16,.3),inset 0 1px rgba(255,255,255,.16);
}
#dashboard #music-card .album-art.is-placeholder::after {
  inset:17%;
  border:1px solid rgba(255,255,255,.32);
  border-radius:50%;
  box-shadow:0 0 0 7px rgba(255,255,255,.05),inset 0 0 0 7px rgba(255,255,255,.07);
  pointer-events:none;
}
#dashboard #music-card .album-art.is-placeholder .art-note {
  color:#52394f;
  transform:none;
}
:root[data-theme=dark] #dashboard #music-card .album-art.is-placeholder .art-note {color:#f7eafa}
#dashboard #music-card .music-control-main {
  background:#a72b51;
  border-color:rgba(150,35,71,.48);
  box-shadow:0 5px 15px rgba(122,25,55,.25);
  color:#fff;
}
#dashboard #music-card .music-control-main:active {background:#86213f}
:root[data-theme=dark] #dashboard #music-card .music-control-main {background:#913352;border-color:rgba(253,173,201,.24)}
:root[data-theme=dark] #dashboard #music-card .music-control-main:active {background:#a74161}
#dashboard #music-card.music-empty .art-caption,
#dashboard #music-card .music-album:empty {display:none}
#dashboard[data-layout=unified] .workspace>#music-card.music-empty:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) {
  justify-content:center!important;
  gap:clamp(12px,2.6vw,27px);
}
#dashboard[data-layout=unified] #music-card.music-empty:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .big-art {
  width:min(72%, max(72px, calc(var(--card-h,500px) - 190px)), 210px)!important;
}
#dashboard[data-layout=unified] #music-card.music-empty:not([data-mini=true]):not([data-wide=true]):not([data-music-medium=true]) .track-info {
  margin-top:0;
}

#dashboard[data-layout=unified] #vehicle-card .car-metrics {
  border-top-color:rgba(100,116,130,.28);
}
#dashboard[data-layout=unified] #vehicle-card .car-metrics div+div {
  border-left-color:rgba(100,116,130,.2);
  padding-left:clamp(5px,1vw,14px);
}
#dashboard[data-layout=unified] #vehicle-card .car-metrics span {
  font-size:11px;
  font-weight:550;
}
#dashboard[data-layout=unified] #vehicle-card .car-metrics strong {
  font-size:clamp(16px,1.65vw,25px);
  line-height:1.16;
  font-variant-numeric:tabular-nums;
}
#dashboard[data-layout=unified] #vehicle-card #car-reading-age {font-size:clamp(12px,1.15vw,16px)}
#car-battery-gauge {
  display:block;
  width:clamp(28px,66%,125px);
  height:7px;
  margin-top:3px;
}
#car-battery-gauge::-webkit-meter-bar {
  border:0;
  border-radius:8px;
  background:rgba(72,91,104,.23);
}
#car-battery-gauge::-webkit-meter-optimum-value {background:#248760}
#car-battery-gauge::-webkit-meter-suboptimum-value,
#car-battery-gauge::-webkit-meter-even-less-good-value {background:#bf752d}
:root[data-theme=dark] #dashboard[data-layout=unified] #vehicle-card .car-metrics {border-top-color:rgba(225,232,242,.2)}
:root[data-theme=dark] #dashboard[data-layout=unified] #vehicle-card .car-metrics div+div {border-left-color:rgba(225,232,242,.16)}
:root[data-theme=dark] #car-battery-gauge::-webkit-meter-bar {background:rgba(226,234,242,.2)}
:root[data-theme=dark] #car-battery-gauge::-webkit-meter-optimum-value {background:#66c49b}
/* Avisos no mapa (radares e futuros tipos): faixa discreta, não bloqueia o mapa. */
.map-legend .alert-radar{width:9px;height:9px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 2px #e31837}
.map-alert-banner{--alert-color:#e31837;position:absolute;z-index:4;top:62px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;max-width:min(420px,calc(100% - 28px));padding:6px 14px 6px 6px;border-radius:999px;color:#17181a;pointer-events:none;box-shadow:0 8px 22px rgba(30,33,36,.22);animation:map-alert-in .3s ease}
.map-alert-banner strong{font-size:13px;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-alert-icon{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 4px var(--alert-color);color:#17181a;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
#dashboard .map-alert-banner{top:auto;bottom:56px;max-width:max(200px,min(420px,calc(100% - 220px)))}
#map-card.route-search-editing .map-alert-banner{display:none}
@keyframes map-alert-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.map-alert-banner{animation:none}}
:root[data-theme=dark] .map-alert-banner{background:rgba(44,46,49,.9);border-color:rgba(217,219,221,.15);color:#f1f1f2}
/* Janela Waze: mapa oficial do Waze num canto do mapa nativo; só a própria janela recebe toques. */
.map-waze-toggle{margin-left:4px}
.waze-window{position:absolute;z-index:4;width:clamp(180px,34%,340px);height:clamp(120px,42%,260px);max-width:calc(100% - 20px);max-height:max(96px,calc(100% - 176px));display:flex;flex-direction:column;overflow:hidden;border-radius:16px;padding:0;box-shadow:0 10px 28px rgba(40,44,47,.28);touch-action:none}
.waze-window[hidden]{display:none}
.waze-window[data-corner=top-right]{top:72px;right:10px}
.waze-window[data-corner=top-left]{top:72px;left:10px}
.waze-window[data-corner=bottom-right]{bottom:104px;right:10px}
.waze-window[data-corner=bottom-left]{bottom:104px;left:10px}
.waze-window.is-dragging{transition:none;opacity:.88;cursor:grabbing}
.waze-window.is-dragging .waze-frame{pointer-events:none}
.waze-window.is-expanded{inset:0;width:auto;height:auto;max-width:none;max-height:none;z-index:6;border-radius:inherit}
.waze-window-bar{flex:none;display:flex;align-items:center;gap:4px;height:32px;padding:0 4px 0 11px;cursor:grab;user-select:none;-webkit-user-select:none;color:#3e4245}
.waze-window.is-expanded .waze-window-bar{cursor:default}
.waze-window-bar strong{flex:1;font-size:11px;letter-spacing:.2px}
.waze-window-bar button{width:28px;height:26px;border:0;border-radius:8px;background:rgba(255,255,255,.7);color:#e31837;font-family:inherit;font-size:15px;font-weight:700;line-height:1;cursor:pointer}
.waze-window-bar button[aria-pressed=true]{background:#fff}
.waze-frame{flex:1;display:block;width:100%;min-height:0;border:0;background:#e9ebec}
#map-card.waze-expanded .map-top-controls,#map-card.waze-expanded .maneuver-balloons,#map-card.waze-expanded .map-alert-banner{visibility:hidden}
:root[data-theme=dark] .waze-window-bar{color:#e6e8e9}
:root[data-theme=dark] .waze-window-bar button{background:rgba(71,75,78,.76);color:#f3f3f4}
/* Caixa Web: ligações abertas dentro do painel. */
.web-card{display:flex;flex-direction:column;gap:10px;padding:12px}
.web-card[hidden]{display:none}
.web-card-bar{display:flex;align-items:center;gap:8px;min-width:0}
.web-card-title{display:flex;flex:1;min-width:0;flex-direction:column;line-height:1.15}
.web-card-title strong{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.web-card-title small{overflow:hidden;color:#6d7379;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.web-card-button{display:grid;flex:none;place-items:center;width:40px;height:40px;padding:0;border:1px solid rgba(111,117,123,.2);border-radius:12px;background:rgba(251,252,252,.84);color:#2f3234;font-size:20px;line-height:1;cursor:pointer}
.web-card-body{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:16px;background:#f3f4f5}
.web-frame{display:block;width:100%;height:100%;border:0;background:#fff}
.web-frame[hidden],.web-card-message[hidden]{display:none}
.web-card-message{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:20px;text-align:center;color:#2f3234}
.web-card-message strong{font-size:16px}
.web-card-message p{max-width:34ch;margin:0;color:#6d7379;font-size:13px}
:root[data-theme=dark] .web-card-title small,:root[data-theme=dark] .web-card-message p{color:#aeb3b7}
:root[data-theme=dark] .web-card-button{background:rgba(71,75,78,.76);color:#f3f3f4}
:root[data-theme=dark] .web-card-body{background:#1d1f21}
:root[data-theme=dark] .web-card-message{color:#e6e8e9}
/* Quadro ligado aos Lembretes: faixa vazia e estado da ligação. */
.project-lane-empty{margin:10px 4px 2px;color:#81878c;font-size:9px;line-height:1.45}
.project-board-signal[data-state=live] i{background:#3a9a68;box-shadow:0 0 0 4px #3a9a6822}
.project-board-signal[data-state=off] i{background:#e36050;box-shadow:0 0 0 4px #e3605022}
