/* AlltagsPilot V12 Signature — a refined layer, retaining existing app functionality.
   Design principles: compact first fold, consistent rhythm, excellent legibility,
   clear privacy labels and a working global actions launcher. */
:root{--ap12-ink:#080f1c;--ap12-surface:#111e2f;--ap12-raised:#182a3e;--ap12-mint:#91e7d7;--ap12-ice:#9cb9e2;--ap12-hairline:rgba(162,199,219,.18)}
html{scroll-behavior:smooth}
body{background:radial-gradient(ellipse 90% 45% at 15% -10%,#173348 0%,transparent 72%),#080f1c}
.app{max-width:1150px}
.bar{border-bottom:1px solid var(--ap12-hairline)}
.brand-mark{background:linear-gradient(143deg,#a6f0d9 0%,#7badde 100%);box-shadow:0 10px 36px rgba(90,160,194,.15)}
.brand-name{letter-spacing:-.7px}
.bar-right{gap:9px}
.badge{border-color:#365b60;background:rgba(44,98,99,.15);color:#a0e9d9;letter-spacing:1px;font-weight:780}
.ap12-search-launch{border:1px solid #334c5e;background:rgba(29,53,74,.5);color:#d7e9f5;border-radius:13px;width:42px;height:42px;display:grid;place-items:center;padding:10px;flex-shrink:0;transition:background .15s,border-color .15s}
.ap12-search-launch svg{width:21px;height:21px}
.ap12-search-launch:hover{background:#213c51;border-color:#60848d}
.ap12-search-launch:active{transform:scale(.97)}
#day .day-hello{background:linear-gradient(116deg,#193b41,#1a2b43 65%,#202d50);border:1px solid #3c6470;box-shadow:0 18px 38px rgba(0,4,16,.18);padding:23px 25px 22px;margin-bottom:20px}
#day .day-hello::before{background:linear-gradient(#91e7d7,#8ebce9);width:3px}
#day .day-hello h2{letter-spacing:-1.4px;line-height:1.14;font-weight:790;font-size:clamp(29px,3.6vw,37px);margin:9px 0 8px}
#day .day-hello p{color:#c1d3df;letter-spacing:0;margin:0;font-size:13px;line-height:1.5}
.ap12-hero-top{display:flex;justify-content:space-between;align-items:center;gap:11px;flex-wrap:wrap}
.ap12-live{font-size:10px;letter-spacing:1.2px;font-weight:770;color:#a2e8dc;border:1px solid #426c69;background:rgba(10,44,42,.38);border-radius:99px;padding:6px 10px;white-space:nowrap}
.ap12-mid-dot{color:#80bcae;padding:0 5px}
.ap12-focusline{margin-top:17px;padding:11px 14px;border-radius:12px;background:rgba(3,16,31,.24);border:1px solid rgba(171,216,225,.12);display:flex;align-items:center;gap:10px;color:#ddf5ed;font-size:13px;line-height:1.5}
.ap12-focus-icon{flex-shrink:0;display:grid;place-items:center;width:25px;height:25px;color:#94e9d8;background:rgba(111,223,196,.12);border-radius:8px}
.ap12-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.ap12-section-heading h3{margin:0;font-size:14px;color:#e6f2f9;font-weight:760;letter-spacing:-.2px}
.ap12-section-heading span{font-size:11px;color:#a7bdd1}
.v11-quick button{background:linear-gradient(160deg,#182e3d,#142236);border-color:#344c60;box-shadow:0 4px 14px rgba(0,0,0,.09)}
.v11-quick button:hover{border-color:#7daeb3}
.v11-quick-icon{background:#21464a;color:#b9f2e6}
html:not([data-v8-theme="light"]) .v8-stat,html:not([data-v8-theme="light"]) .kpi{background:#142438;border-color:#2d475c}
.v8-stat.highlight{background:#16383d!important;border-color:#41796f!important}
html:not([data-v8-theme="light"]) .card{background:linear-gradient(147deg,#172639,#111d30 95%);border-color:#30445a;box-shadow:0 13px 34px rgba(2,9,21,.09)}
.card h2{letter-spacing:-.6px}
.primary,.v10-cloud-button{background:#91e7d7;border-color:#a5f2e3;color:#0a2d31}
.secondary,.v8-action{transition:background .14s,border-color .14s}
.v8-action:hover,.secondary:hover{border-color:#7899ad}
.v8-card-title h2{letter-spacing:-.55px}
.v10-cloud-strip{border:1px solid #385666}
/* First-run helper is shown only with empty local task/calendar/reminder stores */
.ap12-firststart{border:1px solid #4b756e;border-radius:18px;background:linear-gradient(128deg,#18393c,#172a43);padding:20px 22px;margin-bottom:17px;color:#eaf8f3}
.ap12-firststart[hidden]{display:none!important}
.ap12-intro-top{display:flex;align-items:start;justify-content:space-between;gap:12px}
.ap12-intro-kicker{display:block;font-size:10px;letter-spacing:1.3px;font-weight:850;color:#a1eddd}
.ap12-firststart h3{font-size:20px;letter-spacing:-.6px;line-height:1.3;margin:7px 0 6px}
.ap12-firststart p{color:#c3d8df;line-height:1.6;font-size:13px;margin:0;max-width:65ch}
.ap12-intro-dismiss{display:grid;place-items:center;border:1px solid #4a6873;background:#233c4e;color:#d7eff0;font-size:23px;border-radius:12px;min-width:39px;min-height:39px}
.ap12-intro-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:17px}
.ap12-intro-actions button{padding:11px 16px;min-height:44px;border-radius:11px;font-size:13px;font-weight:760}
.ap12-intro-primary{background:#a0eade;border:1px solid #b2f5e7;color:#123136}
.ap12-intro-secondary{background:#20394c;border:1px solid #4b697a;color:#e6f4f8}
/* Search/command palette */
.ap12-search-backdrop:not([hidden]){position:fixed;inset:0;background:rgba(1,8,17,.78);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:180}
.ap12-search-dialog:not([hidden]){display:block;position:fixed;z-index:181;left:50%;top:min(12%,85px);transform:translateX(-50%);width:min(590px,calc(100% - 32px));background:linear-gradient(151deg,#192e43,#0e1b2e);border:1px solid #47647a;border-radius:23px;padding:22px;max-height:78%;overflow:auto;box-shadow:0 30px 110px rgba(0,0,0,.72)}
.ap12-search-head{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:17px}
.ap12-search-kicker{color:#98e5d8;font-size:10px;font-weight:770;letter-spacing:1.6px}
.ap12-search-head h2{font-size:23px;line-height:1.22;letter-spacing:-.75px;margin:7px 0 0;color:#f5faff}
.ap12-search-close{flex-shrink:0;display:grid;place-items:center;min-width:40px;height:40px;border-radius:12px;border:1px solid #435d73;background:#23364b;color:#e3f2fb;font-size:25px}
.ap12-search-input-wrap{display:flex;align-items:center;gap:11px;border:1px solid #4c7180;background:#0e1e2f;border-radius:13px;padding:0 14px;min-height:52px;color:#8edacb}
.ap12-search-input-wrap:focus-within{border-color:#a3e8d8;box-shadow:0 0 0 3px rgba(128,231,211,.13)}
.ap12-search-input-wrap svg{width:21px;height:21px;flex-shrink:0}
#ap12-search-input{width:100%;background:transparent;border:0;outline:0;color:#f1f9fd;font-size:16px;min-height:49px;min-width:0}
#ap12-search-input::placeholder{color:#9fb5c7}
#ap12-search-input::-webkit-search-cancel-button{-webkit-appearance:none}
.ap12-search-results{display:grid;gap:7px;margin-top:15px}
.ap12-result{border:1px solid transparent;border-radius:13px;background:rgba(44,72,89,.31);color:#f0f7fc;text-align:left;display:flex;align-items:center;gap:13px;min-height:61px;padding:10px 12px}
.ap12-result:hover,.ap12-result:focus-visible{background:#263d50;border-color:#688b91}
.ap12-result-ico{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#b6f4e3;background:#234448;font-size:18px;flex-shrink:0}
.ap12-result-main{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.ap12-result-main strong{font-size:14px;font-weight:740}
.ap12-result-main small{font-size:11px;color:#b3c5d3;line-height:1.4}
.ap12-result-arrow{color:#9dbdc9;font-size:19px}
.ap12-noresult{color:#bbcfde;text-align:center;padding:22px 8px;font-size:14px}
.ap12-search-bottom{color:#9fb3c4;line-height:1.55;font-size:11px;display:flex;justify-content:space-between;gap:10px;margin:15px 2px 0}
.ap12-search-hint{white-space:nowrap;color:#9fd6d4}
body.ap12-dialog-open{overflow:hidden}
html[data-v8-theme="light"] .ap12-search-launch{background:#eff6f9;border-color:#bdd7df;color:#34536a}
html[data-v8-theme="light"] .ap12-focusline{background:#d8efe9;color:#175348;border-color:#c0dcd4}
html[data-v8-theme="light"] .ap12-firststart{background:#ecf9f6;border-color:#c7dcd7;color:#20483e}
html[data-v8-theme="light"] .ap12-firststart p{color:#435f61}
html[data-v8-theme="light"] .ap12-section-heading h3{color:#244558}
html[data-v8-theme="light"] .ap12-section-heading span{color:#4d6c7b}
html[data-v8-theme="light"] .v11-quick button{background:#f5f9fc;color:#244a60;border-color:#ccdee6}
html[data-v8-theme="light"] .v11-quick-icon{background:#d9eee9;color:#217c6a}
html[data-v8-theme="light"] .ap12-live{background:#d7efea;border-color:#c2e2dc;color:#20796b}
@media(max-width:780px){
  .app{padding-left:16px;padding-right:16px}
  .bar{min-height:62px;height:auto;padding-bottom:12px;margin-bottom:15px}
  .brand-mark{width:37px;height:37px}
  .brand-name{font-size:18px}
  .brand-name small{font-size:8px;letter-spacing:.65px}
  .ap12-search-launch{height:39px;width:39px;border-radius:12px;padding:9px}
  .badge{letter-spacing:.6px;font-size:9px;padding:7px 9px;white-space:nowrap}
  #day .day-hello{padding:20px 19px;margin-bottom:15px;border-radius:18px}
  #day .day-hello h2{font-size:clamp(25px,6.5vw,31px);letter-spacing:-.9px}
  #day .day-hello p{font-size:12px}
  .ap12-hero-top .v8-kicker{font-size:9px;letter-spacing:1.1px}
  .ap12-live{font-size:9px;letter-spacing:.8px;padding:5px 7px}
  .ap12-focusline{margin-top:14px;padding:9px 10px;font-size:12px}
  .ap12-section-heading{margin-bottom:9px}
  .ap12-section-heading h3{font-size:13px}
  .ap12-section-heading span{font-size:10px}
  .v11-quick{gap:8px;margin-bottom:16px}
  .v11-quick button{min-height:70px;padding:9px 3px 8px;gap:6px}
  .v11-quick-icon{width:31px;height:31px}
  .v8-stats{gap:8px}
  #day .day-refresh{width:42px;height:42px}
  .ap12-firststart{padding:16px}
  .ap12-firststart h3{font-size:17px}
  .ap12-search-dialog:not([hidden]){top:max(14px,calc(env(safe-area-inset-top,0px) + 10px));max-height:calc(100% - 28px - env(safe-area-inset-top,0px));padding:18px;border-radius:18px}
  .ap12-search-head h2{font-size:20px}
  /* Protect last action from the dock while keeping dock visually contained */
  .app{padding-bottom:calc(185px + env(safe-area-inset-bottom,0px))}
  .v9-dock{width:min(520px,calc(100% - 24px));height:63px;border-color:#47606c;background:rgba(16,30,45,.97)}
  .v9-dock-item{min-height:50px}
}
@media(max-width:360px){
  .brand-name{font-size:16px}.brand-name small{display:none}
  .badge{font-size:8px;padding:6px 7px}.v11-badge-detail{display:none}
  .ap12-search-launch{width:36px;height:36px}
  #day .day-hello h2{font-size:25px}
  .ap12-section-heading span{display:none}
  .ap12-live{font-size:8px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.ap12-search-launch,.ap12-result{transition:none}}
/* Explicit flex order avoids inserting new cards above the greeting on mobile. */
#day.active{display:flex;flex-direction:column}
#day>.day-hello{order:1}
#day>.ap12-section-heading{order:2}
#day>.v11-quick{order:3}
#day>.v8-stats{order:4}
#day>.ap12-firststart{order:5}
#day>.v8-layout{order:6}
#day>.v10-cloud-strip{order:7;margin-top:18px}
#day>.v8-note{order:8}
#day>.install-banner{order:9}
