/* Cloud layer: sign-in, projects, team and share. Uses the app's own tokens (--bg, --surface, --accent …). */
body.booting > *:not(#cloud):not(script):not(link) { display: none !important; }
#cloud:empty { display: none; }
.cl-page { min-height: 100dvh; background: var(--bg); color: var(--fg); font-family: var(--font); display: flex; flex-direction: column; }
.cl-top { display: flex; align-items: center; gap: 12px; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); min-height: 60px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cl-top .sp { flex: 1; }
.cl-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--fg); text-decoration: none; }
.cl-brand svg { width: 26px; height: 26px; }
.cl-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none; padding: 9px 11px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.cl-link:hover { color: var(--fg); background: var(--sunk); }
.cl-link svg { width: 18px; height: 18px; }
.cl-me { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.cl-av { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.cl-badge { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 2px 6px; }
.cl-main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left)); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cl-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cl-side { flex: 1 1 400px; max-width: 470px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.cl-h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.01em; }
.cl-h2 { margin: 0; font-size: 20px; }
.cl-sub { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.cl-small { font-size: 13px; color: var(--muted); }
.cl-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cl-grid2 .full { grid-column: 1 / -1; }
.cl-err { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.cl-ok { background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.cl-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cl-tr { display: grid; grid-template-columns: 66px minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr) 120px; gap: 14px; padding: 13px 18px; align-items: center; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--fg); }
.cl-tr:last-child { border-bottom: 0; }
.cl-tr.head { background: var(--sunk); font-size: 12.5px; font-weight: 600; color: var(--muted); padding-block: 10px; }
a.cl-tr:hover { background: var(--sunk); }
.cl-tr b { display: block; font-size: 15.5px; }
.cl-tr small { font-size: 13px; color: var(--muted); }
.cl-date { display: flex; flex-direction: column; align-items: center; width: 50px; border-radius: 8px; border: 1px solid var(--line); padding: 4px 0; background: var(--surface); }
.cl-date b { font-size: 19px; line-height: 1; }
.cl-date span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.cl-date.none { border-style: dashed; color: var(--faint); font-size: 12px; height: 40px; justify-content: center; }
.cl-empty { padding: 32px; text-align: center; color: var(--muted); }
.cl-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cl-choice button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); cursor: pointer; text-align: left; font-family: inherit; color: var(--fg); }
.cl-choice button b { font-size: 14.5px; }
.cl-choice button span { font-size: 12.5px; color: var(--muted); }
.cl-choice button[aria-pressed="true"] { border: 1.5px solid var(--accent-2); background: var(--accent-soft); }
.cl-auth { min-height: 100dvh; display: grid; place-items: center; background: var(--bg); padding: 24px; box-sizing: border-box; font-family: var(--font); color: var(--fg); }
.cl-auth .cl-card { width: min(420px, 100%); }
.cl-modal-bg { position: fixed; inset: 0; background: rgba(10,16,18,.38); z-index: 70; display: grid; place-items: center; padding: 20px; animation: clfade .18s ease-out; }
.cl-modal { width: min(600px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); color: var(--fg); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; font-family: var(--font); }
.cl-person { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cl-person:last-child { border-bottom: 0; }
.cl-person .who { flex: 1; min-width: 0; }
.cl-person .who b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.cl-person .who small { font-size: 12.5px; color: var(--muted); }
.cl-person select { width: auto; min-height: 36px; }
.cl-status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cl-status.ok { color: #2b7a3e; } .cl-status.bad { color: var(--danger); }
.cl-status svg { width: 16px; height: 16px; }
.cl-dateinput { width: 150px; min-height: 34px; font-size: 14px; }
.cl-viewonly { font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 5px; padding: 3px 8px; }
@keyframes clfade { from { opacity: 0; } }
@media (max-width: 760px) {
  .cl-tr { grid-template-columns: 58px minmax(0, 1fr) 90px; }
  .cl-tr > :nth-child(3), .cl-tr > :nth-child(4) { display: none; }
  .cl-choice { grid-template-columns: 1fr; }
  .cl-dateinput { width: 130px; }
}
