/* Sovra Cloud shell: top bar, search, the stage, the dock, the New menu, sign-in. */
.app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }

/* Top bar */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px 20px; min-height: 68px; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: 20px; transition: border-radius .5s var(--spring), transform .5s var(--spring); flex: none; }
.logo:hover { border-radius: 22px; transform: rotate(-12deg); }
.logo.small { pointer-events: none; width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
.orgname { display: grid; line-height: 1.15; margin-right: 8px; min-width: 0; }
.orgname b { font-size: 18px; font-weight: 500; white-space: nowrap; }
.orgname span { font-size: 12.5px; color: var(--on-v); white-space: nowrap; }
.search { flex: 1 1 320px; max-width: 640px; margin: 0 auto; position: relative; }
.search label { display: flex; align-items: center; gap: 10px; height: 48px; border-radius: 24px; background: var(--high); padding: 0 16px; color: var(--on-v); transition: background .2s var(--fx); }
.search label:focus-within { background: var(--highest); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 15px; color: var(--on); }
.search input::placeholder { color: var(--on-v); }
.results { position: absolute; left: 0; right: 0; top: 54px; background: var(--cont); border-radius: 16px; box-shadow: var(--el3); padding: 8px; z-index: 40; max-height: 60vh; overflow: auto; display: none; }
.results.on { display: block; animation: rise .35s var(--spring-fast) both; }
.results h4 { margin: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--on-v); text-transform: uppercase; letter-spacing: .6px; }
.results .row { border-radius: 12px; }
.results .qf { padding: 6px 8px 2px; }
.chip.kept { cursor: pointer; background: none; }
.chip.kept.off { border-color: var(--warn); color: var(--warn); }

/* Stage and view */
.stage { margin: 0 8px; padding-bottom: 92px; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.view { background: var(--surface); border-radius: 14px; min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); transition: background .3s linear; }
.view.enter > * { animation: enter .5s var(--spring) both; }

/* Dock: navigation at the bottom, like the taskbar on a SOVRA desktop */
.dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; z-index: 30; max-width: calc(100vw - 16px); }
.dock nav { display: flex; gap: 2px; padding: 6px; border-radius: 30px; background: var(--highest); box-shadow: var(--el3); }
.dock nav button { height: 48px; padding: 0 16px; border-radius: 24px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--on-v); white-space: nowrap; transition: background .2s var(--fx), color .2s var(--fx), padding .35s var(--spring-fast); }
.dock nav button[aria-current="page"] { background: var(--secondary-c); color: var(--on-secondary-c); font-weight: 600; padding: 0 20px; }
.fab { height: 60px; padding: 0 24px 0 20px; border-radius: 20px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; box-shadow: var(--el3); transition: border-radius .5s var(--spring); }
.fab:hover { border-radius: 30px; }
/* A guest (gap row 8, 17 Nov 2026) has the files shared with them only: no New, no search, no mail or chat badges. */
html.guest .fab, html.guest #newmenu, html.guest .search, html.guest #focus { display: none !important; }
.fab svg.i { width: 22px; height: 22px; transition: transform .5s var(--spring); }
.fab[aria-expanded="true"] svg.i { transform: rotate(45deg); }
.menu { position: fixed; right: 0; bottom: 84px; background: var(--cont); border-radius: 16px; box-shadow: var(--el3); padding: 8px; min-width: 232px; z-index: 35; display: none; transform-origin: bottom right; }
.menu.on { display: block; animation: pop .35s var(--spring-fast) both; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.menu hr { border: 0; border-top: 1px solid var(--outline-v); margin: 6px 8px; }

/* Sign-in */
.gate { position: fixed; inset: 0; z-index: 80; background: var(--cont); display: grid; place-items: center; padding: 16px; transition: opacity .3s linear, visibility .3s; }
.gate.off { opacity: 0; visibility: hidden; pointer-events: none; }
.gate .box { width: min(440px, 100%); background: var(--surface); border-radius: 28px; padding: 32px 28px 24px; display: grid; gap: 14px; animation: enter .5s var(--spring) both; }
.gate .who { padding: 0; gap: 14px; }
.gate .who b { font-size: 16px; }
.gate h1 { font-size: 28px; font-weight: 600; font-stretch: 108%; line-height: 1.15; margin-top: 8px; }
.gate .btn { height: 52px; border-radius: 26px; justify-content: flex-start; padding: 0 22px; }
.gate .small { text-align: center; font-size: 12.5px; }

/* An area that is not carried over yet */
.later { display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; padding: 40px 24px; }
.later .av { width: 64px; height: 64px; border-radius: 22px; }
.later .av svg.i { width: 30px; height: 30px; }
.later h1 { font-size: 26px; font-weight: 600; font-stretch: 108%; }
.later p { max-width: 460px; color: var(--on-v); }

@media (max-width: 1100px) { .chip.kept { display: none; } }
@media (max-width: 860px) {
  .orgname { display: none; } .top { padding: 8px 10px; gap: 8px; min-height: 60px; }
  .logo { width: 40px; height: 40px; }
  #focus { display: none; }
  .search { flex: 1 1 0; min-width: 0; } .search label { padding: 0 12px; gap: 8px; }
  .stage { margin: 0 4px; padding-bottom: 78px; }
  .dock { left: 0; right: 0; bottom: 0; transform: none; max-width: none; }
  .dock nav { flex: 1; border-radius: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -1px 0 var(--outline-v); background: var(--cont); }
  .dock nav button { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0 2px; font-size: 10.5px; border-radius: 16px; position: relative; }
  .dock nav button[aria-current="page"] { padding: 0 2px; }
  .dock nav .badge { position: absolute; top: 4px; right: 4px; }
  .fab { position: fixed; right: 12px; bottom: 82px; height: 56px; width: 56px; padding: 0; justify-content: center; }
  .fab span { display: none; }
  .menu { right: 12px; bottom: 148px; }
}

/* Password sign-in (server backend) */
.gate form.signform { display: grid; gap: 12px; }
.gate form.signform .btn { justify-content: center; }
.gate #g-err { color: var(--error, #ba1a1a); margin: 0; }
