/* ============================================================================
   LAYOUT DO APP — sidebar, topbar, bottom-nav mobile, session banner
   Novo (não existe no protótipo preview.html, que só simulava telas soltas).
   Inspirado nos mesmos tokens/proporções da sidebar do preview.html.
   ========================================================================== */

.app-shell{display:flex; min-height:100vh}

/* -- Sidebar (desktop/tablet) -- */
.app-sidebar{
  width:248px; flex-shrink:0; background:linear-gradient(175deg,var(--shell-800),var(--shell-900));
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; z-index:40;
}
.sb-brand{display:flex; flex-direction:column; gap:8px; padding:22px 20px; border-bottom:1px solid var(--shell-line)}
.sb-logo-img{width:150px; max-width:100%; height:auto; object-fit:contain; display:block}
.sb-brand-caption{color:var(--shell-text-3); font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase}

.sb-nav{flex:1; overflow-y:auto; padding:14px 10px}
.sb-item{
  display:flex; align-items:center; gap:11px; padding:10px 14px; margin-bottom:3px; border-radius:var(--r-full);
  color:var(--shell-text-2); font-size:13.5px; font-weight:500; cursor:pointer; border:none; background:none; width:100%; text-align:left;
  transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); position:relative;
}
.sb-item svg{width:17px; height:17px; flex-shrink:0; opacity:.85; transition:opacity var(--t-fast) var(--ease)}
.sb-item:hover{background:rgba(255,255,255,.08); color:var(--shell-text)}
.sb-item:active{transform:scale(.98)}
.sb-item.active{background:linear-gradient(135deg,var(--brand),var(--brand-600)); color:#fff; font-weight:600; box-shadow:0 4px 14px -4px rgba(176,24,40,.55)}
.sb-item.active svg{opacity:1}

.sb-foot{padding:14px 18px; border-top:1px solid var(--shell-line); display:flex; align-items:center; gap:10px}
.sb-foot-info{min-width:0; flex:1}
.sb-foot-info strong{display:block; color:var(--shell-text); font-size:12.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.sb-foot-info span{display:block; color:var(--shell-text-3); font-size:10.5px; margin-top:1px}
.sb-logout-btn{background:none; border:none; color:var(--shell-text-2); cursor:pointer; padding:6px; border-radius:var(--r-xs); display:flex; flex-shrink:0}
.sb-logout-btn:hover{color:#fff; background:rgba(255,255,255,.08)}
.sb-logout-btn svg{width:16px; height:16px}

/* -- Área principal -- */
.app-main{flex:1; min-width:0; display:flex; flex-direction:column; background:var(--bg)}
.app-topbar{
  display:flex; align-items:center; gap:14px; padding:16px 28px; background:var(--surface);
  border-bottom:1px solid var(--border); flex-wrap:wrap; position:sticky; top:0; z-index:30;
}
.app-topbar h1{font-size:19px}
.topbar-actions{display:flex; align-items:center; gap:10px; margin-left:auto}
.icon-btn{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--surface);
  display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--ink-600); position:relative;
  transition:all var(--t-fast) var(--ease);
}
.icon-btn:hover{border-color:var(--brand); color:var(--brand); box-shadow:var(--shadow-1)}
.icon-btn svg{width:16px; height:16px}
.icon-btn .dot{position:absolute; top:6px; right:7px; width:7px; height:7px; border-radius:50%; background:var(--brand); border:1.5px solid var(--surface)}
.demo-flag{font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--warning-ink); background:var(--warning-bg); padding:3px 9px; border-radius:var(--r-full)}

.app-content{flex:1; padding:26px 28px 60px}

.view{display:none}
.view.active{display:block; animation:viewIn .22s var(--ease) both}
@keyframes viewIn{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:translateY(0)}}

/* -- Bottom nav (mobile) -- */
.bottom-nav{display:none}

/* -- Banner de sessão expirando -- */
.session-warn-banner{
  position:fixed; bottom:0; left:0; right:0; z-index:1200; background:var(--warning-ink); color:#fff;
  padding:12px 20px; display:flex; align-items:center; justify-content:center; gap:14px; font-size:13px; font-weight:600;
}
.session-warn-banner button{background:#fff; color:var(--warning-ink); border:none; border-radius:var(--r-full); padding:6px 14px; font-size:12.5px; font-weight:700; cursor:pointer}

/* ============================================================================
   LOGIN — conteúdo da arte lateral (copiado do fragmento aprovado do preview.html)
   ========================================================================== */
.login-art-logo{width:190px; max-width:60%; height:auto; display:block; margin-bottom:40px}
.login-tagline{
  font-family:var(--font-display); font-weight:600; font-size:30px; line-height:1.28;
  letter-spacing:-0.01em; color:var(--shell-text); max-width:420px; margin:0 0 16px;
}
.login-tagline-sub{font-size:15px; line-height:1.6; color:var(--shell-text-2); max-width:400px; margin:0 0 36px}
.login-proof-row{display:flex; flex-wrap:wrap; gap:12px}
.login-proof-card{
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10); backdrop-filter:blur(6px);
  border-radius:var(--r-md); padding:14px 16px; min-width:150px; flex:1 1 150px;
}
.login-proof-val{font-family:var(--font-display); font-weight:700; font-size:20px; color:var(--shell-text); margin-bottom:2px}
.login-proof-label{font-size:12px; color:var(--shell-text-3); line-height:1.4}

/* -- Banner de divulgação (campanha com posicao="login") -- */
.login-banner{
  display:flex; gap:14px; align-items:center; margin-top:28px; max-width:420px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10); backdrop-filter:blur(6px);
  border-radius:var(--r-md); padding:14px; text-decoration:none; transition:background var(--t-fast) var(--ease);
}
a.login-banner:hover{background:rgba(255,255,255,.10)}
.login-banner-img{width:76px; height:76px; border-radius:var(--r-sm); object-fit:cover; flex-shrink:0}
.login-banner-title{font-family:var(--font-display); font-weight:700; font-size:14.5px; color:var(--shell-text); margin-bottom:3px}
.login-banner-desc{font-size:12.5px; color:var(--shell-text-2); line-height:1.4}
.login-card-badge{
  display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600;
  color:var(--ink-500); text-transform:uppercase; letter-spacing:.06em; margin-bottom:14px;
}
.otp-msg strong{color:var(--ink-800)}

/* ============================================================================
   RESPONSIVO — sidebar vira bottom-nav abaixo de 860px, mesmo padrão do app real
   ========================================================================== */
@media (max-width: 860px){
  .app-sidebar{display:none}
  .app-content{padding:16px 14px 80px}
  .app-topbar{padding:12px 14px}
  .app-topbar h1{font-size:16px}
  .bottom-nav{
    display:flex; position:fixed; bottom:0; left:0; right:0; height:56px; background:var(--shell-900);
    border-top:1px solid var(--shell-line); z-index:100; box-shadow:0 -8px 24px rgba(0,0,0,.28);
  }
  .bottom-nav-item{
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    color:var(--shell-text-3); background:none; border:none; cursor:pointer; font-size:9.5px; font-weight:600;
  }
  .bottom-nav-item svg{width:18px; height:18px}
  .bottom-nav-item.active{color:var(--shell-text)}
  .bottom-nav-item.active svg{color:var(--brand)}
}
@media (max-width: 640px){
  .app-content{padding:12px 10px 76px}
  .session-warn-banner{font-size:12px; padding:10px 14px; flex-wrap:wrap; text-align:center}
}
