/* AB Wealth optional cloud features; inherits existing AB Wealth colors and typography */
.cloud-panel{margin-bottom:18px;background:linear-gradient(120deg,#f3fafa,#fff);border:1px solid #cfe8e7!important}
.cloud-panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.cloud-panel-title>div{display:grid;gap:3px}.cloud-panel-title small{color:#617784;font-size:12px}.cloud-panel-status{font-size:13px;color:#176b69;margin-top:10px;display:flex;align-items:center;gap:8px}
.cloud-dialog[hidden],.cloud-lock[hidden]{display:none!important}
.cloud-dialog{position:fixed;inset:0;z-index:9998;display:grid;place-items:center;padding:15px}
.cloud-backdrop{position:absolute;inset:0;background:rgba(8,26,38,.6);backdrop-filter:blur(5px)}
.cloud-window{position:relative;width:min(560px,100%);background:#fff;border-radius:22px;box-shadow:0 24px 90px rgba(4,23,35,.32);max-height:92dvh;overflow:auto;color:#193442}
.cloud-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 12px;border-bottom:1px solid #edf2f5}.cloud-header h2{margin:0;font-size:19px}.cloud-header .icon-btn{font-size:24px}
.cloud-content{padding:22px 24px 25px}.cloud-logo{display:flex;align-items:center;gap:12px;margin:0 0 14px}.cloud-logo>div{display:flex;flex-direction:column;gap:2px}.cloud-logo strong{font-size:17px}.cloud-logo small{color:#66808d;font-size:12px}
.cloud-status{border:1px solid #d0e8e5;background:#f0faf8;color:#116c64;padding:12px 14px;border-radius:12px;font-size:13px;display:flex;gap:9px;margin-bottom:20px;align-items:center}.cloud-status.danger{background:#fff1f0;color:#a33b32;border-color:#f2c2c1}
.cloud-auth-form{display:grid;gap:12px;margin-top:14px}.cloud-auth-form label{display:grid;gap:5px;font-size:13px;color:#365463;font-weight:600}.cloud-auth-form input{width:100%;border:1px solid #cbd8df;border-radius:10px;padding:12px 13px;font:inherit;font-size:15px;color:#16323d;background:#fff}.cloud-auth-form input:focus{outline:3px solid #d2f1eb;border-color:#108a80}
.cloud-buttons{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}.cloud-buttons button{flex:1 1 120px}.cloud-identity{background:#f3f6f7;border:1px solid #e2ebef;border-radius:12px;padding:11px 13px;font-size:13px;margin-bottom:14px;overflow-wrap:anywhere}
.cloud-conflict{padding:13px;border:1px solid #f1b4b0;border-radius:13px;margin:10px 0}.cloud-conflict small{display:block;color:#647684;line-height:1.5;margin-top:5px}.cloud-footer-actions{border-top:1px solid #ebf0f2;margin-top:18px;padding-top:14px}.cloud-dialog .tiny{line-height:1.55;margin-top:20px}
.cloud-lock{position:fixed;inset:0;z-index:9900;background:linear-gradient(140deg,#092b3a,#0b514d);display:grid;place-items:center;padding:20px}.cloud-lock-card{background:white;color:#173542;text-align:center;border-radius:23px;padding:28px 25px;width:min(440px,100%);box-shadow:0 18px 65px #001b2852;display:grid;gap:12px;justify-items:center}.cloud-lock-card h2{font-size:22px;margin:2px 0}.cloud-lock-card p{margin:0;color:#546e7b;line-height:1.5;font-size:14px}.cloud-lock-card button{width:100%;justify-content:center}.cloud-lock-card small{color:#6c7f88;font-size:11px;line-height:1.5}
.cloud-pending #app{visibility:hidden}.cloud-locked #app{visibility:hidden}
@media(max-width:650px){.cloud-window{max-height:96dvh;border-radius:16px}.cloud-header{padding:18px}.cloud-content{padding:18px}.cloud-panel-title{align-items:flex-start}.cloud-panel-title .btn{white-space:nowrap}.cloud-buttons{flex-direction:column}.cloud-buttons button{width:100%}}

@media(max-width:650px){.cloud-top-button{min-width:38px;padding:9px!important}.cloud-top-label{display:none}.cloud-top-button svg{width:17px;height:17px}}

/* AB Wealth V3.3.3: make the mobile cloud control visible, labelled and accessible.
   Old mobile CSS hid both the SVG and the Sync text, producing a blank button. */
@media (max-width:760px){
 .top-actions .btn.cloud-top-button{
   display:inline-flex!important;align-items:center;justify-content:center;
   gap:5px;min-width:72px;padding:10px 10px!important;
   background:#edf8f6;border:1px solid #a8d6cc;color:#075c54;
   font-weight:800;font-size:11px!important;line-height:1.2;
 }
 .top-actions .btn.cloud-top-button svg{
   display:inline-block!important;visibility:visible!important;
   width:15px;height:15px;min-width:15px;flex-shrink:0;
 }
 .top-actions .btn.cloud-top-button .cloud-top-label{
   display:inline!important;visibility:visible!important;
   font-size:11px;line-height:1.2;
 }
 .top-actions .btn.cloud-top-button:focus-visible{
   outline:3px solid #0b8278;outline-offset:2px;
 }
 .top-actions .btn.cloud-top-button:hover{background:#dbf1ec;}
}
@media(max-width:360px){
 .top-actions .btn.cloud-top-button{min-width:62px;padding:9px 7px!important;}
 .top-actions .btn.cloud-top-button svg{width:13px;height:13px;min-width:13px;}
 .top-actions .btn.cloud-top-button .cloud-top-label{font-size:10px;}
}

/* V3.3.4.1: neutral startup indicator during Firebase Auth restoration.
   The full security lock remains for real signed-out/mismatched sessions. */
.cloud-boot{display:none;position:fixed;inset:0;z-index:9850;place-items:center;background:linear-gradient(145deg,#eff7f7,#f9fcfb);padding:20px;color:#173542}
.cloud-pending .cloud-boot{display:grid}
.cloud-boot-card{display:grid;justify-items:center;text-align:center;gap:10px;max-width:300px}
.cloud-boot-title{font-weight:750;font-size:18px;line-height:1.3}
.cloud-boot-caption{font-size:13px;color:#59717b}
.cloud-boot-progress{width:132px;height:3px;margin-top:7px;background:#d4e8e4;border-radius:99px;overflow:hidden}
.cloud-boot-progress span{display:block;width:35%;height:100%;border-radius:99px;background:#087e78;animation:ab-boot-pulse 1.35s ease-in-out infinite alternate}
@keyframes ab-boot-pulse{from{transform:translateX(-15%)}to{transform:translateX(230%)}}
@media(prefers-reduced-motion:reduce){.cloud-boot-progress span{animation:none;width:100%}}

/* AB Wealth V3.3.5 — compact cloud dialog and comfortable mobile touch sizes.
   These selectors modify presentation only; authentication logic remains unchanged. */
@media (max-width: 760px) {
  .cloud-dialog { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); align-items:center; }
  .cloud-window { width: min(520px, 100%); max-height: calc(100dvh - 16px); border-radius:18px; }
  .cloud-header { padding:12px 15px; min-height:57px; }
  .cloud-header h2 {font-size:17px;line-height:1.25;}
  .cloud-header .icon-btn { min-width:36px;min-height:36px; }
  .cloud-content { padding:14px 15px 17px; }
  .cloud-logo { gap:9px;margin-bottom:10px; }
  .cloud-logo img { width:36px !important;height:36px !important; }
  .cloud-logo strong { font-size:15px; }
  .cloud-logo small { font-size:11px; }
  .cloud-status {padding:9px 11px;border-radius:11px;margin-bottom:13px;font-size:12px;line-height:1.45;}
  .cloud-identity {padding:9px 11px;margin-bottom:11px;font-size:12px;}
  .cloud-auth-form {gap:9px;margin-top:11px;}
  .cloud-auth-form label {font-size:12px;gap:5px;}
  .cloud-auth-form input {min-height:44px;padding:9px 11px;font-size:14px;border-radius:10px;}
  .cloud-buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px;}
  .cloud-buttons button {width:100%;min-width:0;min-height:42px;padding:9px 10px;font-size:12px;line-height:1.25;flex:initial;}
  .cloud-auth-form .cloud-buttons [data-cloud="reset"] {grid-column:1/-1;min-height:37px;border:0;background:transparent;color:#236a65;}
  .cloud-footer-actions {margin-top:12px;padding-top:11px;}
  .cloud-footer-actions button {min-height:40px;padding:8px 12px;font-size:12px;}
  .cloud-dialog .notice {margin:9px 0;padding:10px 12px;font-size:12px;}
  .cloud-dialog .tiny {line-height:1.45;margin-top:12px;}
  .cloud-content > .btn {min-height:42px;}
  .cloud-conflict .cloud-buttons {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:350px){
  .cloud-content {padding:12px 12px 15px;}
  .cloud-buttons {gap:6px;}
  .cloud-buttons button {font-size:11px;padding-inline:7px;}
}

/* V3.3.6 private quote snapshot controls */
.cloud-market-box{margin:12px 0;padding:13px;border:1px solid var(--border,#dce9e9);border-radius:12px;background:rgba(7,126,120,.035);display:grid;gap:8px}
.cloud-market-box .btn{justify-self:start;min-height:38px}
.cloud-market-box small{color:var(--muted,#667786);line-height:1.45}
@media(max-width:430px){.cloud-market-box{padding:11px}.cloud-market-box .btn{width:100%}}
