/* Control Center online: the login screen and the log-out button (same colors as the home screen). */
#cc-login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px 16px; background: var(--bg); }
#cc-login[hidden] { display: none; }
body.cc-locked .shell { visibility: hidden; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c-home); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px 18px; display: flex; flex-direction: column; gap: 4px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 4px; }
.login-brand svg { width: 30px; height: 30px; fill: none; stroke: var(--ink-2); stroke-width: 2; }
.login-brand svg .fill { fill: var(--c-home); stroke: var(--c-home); }
.login-hint { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.login-card label { display: block; margin: 8px 0; font-size: 14px; color: var(--ink-2); }
.login-card input { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.login-card input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.login-card .btn.primary { --app: var(--c-home); justify-content: center; padding: 11px; margin-top: 8px; font-size: 15px; }
.login-msg { min-height: 1em; margin: 8px 0 0; font-size: 14px; color: var(--bad); }
.login-msg.ok { color: var(--ok); }
.login-switch { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font-size: 14px; text-align: left; }
.logout-btn { margin-top: auto; }
.logout-btn + .collapse-btn { margin-top: 0; }
@media (max-width: 760px) { .logout-btn { display: none; } }

/* ---------- Alerts (iPhone and other devices) ---------- */
.home-actions { display: flex; gap: 8px; align-items: center; }
#cc-alerts { position: fixed; inset: 0; z-index: 90; background: rgba(42, 38, 34, .35); display: grid; place-items: center; padding: 16px; }
#cc-alerts[hidden] { display: none; }
.alerts-card { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c-home); border-radius: var(--radius); box-shadow: var(--shadow); }
.alerts-body { padding: 18px 20px 16px; }
.alerts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.alerts-head h2 { margin: 0; font-size: 19px; }
.alerts-x { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); width: 36px; height: 36px; border-radius: 18px; }
.alerts-x:hover { background: var(--line-soft); }
.alerts-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.alerts-row input, .alerts-acc input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.alerts-row b { display: block; }
.alerts-row .small { display: block; }
.alerts-accounts { padding: 4px 0 8px 32px; }
.alerts-accounts.off { opacity: .45; }
.alerts-acc-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0; }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px 2px; font: inherit; font-size: 13px; }
.alerts-acc { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; min-width: 0; }
.alerts-acc .acc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerts-acc .acc-name .small { margin-left: 6px; }
.alerts-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.alerts-on { --app: var(--c-home); margin-top: 6px; }
.alerts-note { min-height: 1em; margin: 10px 0 0; font-size: 14px; color: var(--ok); }
.alerts-warn { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.alerts-steps { padding-left: 20px; } .alerts-steps li { margin: 6px 0; }
@media (max-width: 760px) {
  #cc-alerts { place-items: end stretch; padding: 0; }
  .alerts-card { max-width: none; border-radius: 16px 16px 0 0; max-height: 88dvh; padding-bottom: env(safe-area-inset-bottom); }
}
