/* ================= LAYOUT =================
   phone-shell, screen, scroll-area, header fijo, bottom-nav.
   Movil-first: contenedor centrado en pantallas grandes.
*/

/* App container — mobile only, centered on larger screens */
.phone-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

.screen { display: none; flex-direction: column; height: 100%; animation: fadeIn 0.4s ease; }
.screen.active { display: flex; }

/* Fixed header for each screen — constrained to phone-shell width */
.screen > .px-5.pt-6.pb-3,
.screen > .px-5.pt-2.pb-3 {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 40;
  background: rgba(4, 22, 31, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.screen > .px-5.pt-6.pb-3 { padding-top: 14px; padding-bottom: 10px; }
.screen > .px-5.pt-2.pb-3 { padding-top: 10px; padding-bottom: 10px; }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 86px 18px 90px;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* Bottom nav — constrained to phone-shell width */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(4, 22, 31, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 10px 14px 18px;
  display: flex;
  justify-content: space-around;
  z-index: 50;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  transition: all 0.25s;
  cursor: pointer;
  border-radius: 12px;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-icon { background: rgba(0, 212, 255, 0.15); transform: translateY(-2px); }
.nav-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  transition: all 0.25s;
}
.nav-btn svg { width: 18px; height: 18px; }

/* Cliente tab containers */
.cliente-tab { display: none; flex-direction: column; }
.cliente-tab.active { display: flex; }

/* Login scroll override */
#screen-login .scroll-area.login-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: 32px;
}
@media (max-height: 760px) {
  #screen-login .logo-bubble { width: 42px; height: 42px; border-radius: 14px; }
  #screen-login h1 { font-size: 1.25rem; }
  #screen-login .card-elevated { margin-bottom: 12px; }
  #screen-login h3 { margin-bottom: 8px; }
  #screen-login .role-card { padding: 10px 12px; }
  #screen-login .role-icon { width: 34px; height: 34px; }
}

/* Sidebar navigation on tablet/desktop — removed: mobile only */