/* Gerado por split de app/static/css/estilo_ph3a.css (fundação da reorganização de CSS, 03/08/2026). Ver app/utils/css_manifest.py pra ordem de carregamento. */

/* ============================================================
   FORCE MOBILE VIEW — Phone Frame Preview
   Exibe um frame de celular centralizado na tela desktop.
   O trick: transform no ph3a-wrapper faz com que os filhos
   position:fixed sejam contidos dentro do frame.
   ============================================================ */

/* Fundo escuro atrás do frame */
body.ph3a-force-mobile {
  background: #0a1628 !important;
  overflow: hidden;
}

/* Label acima do frame */
body.ph3a-force-mobile #ph3aPhoneLabel {
  position: fixed;
  top: calc(50% - min(426px, 43vh) - 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

/* Wrapper vira o frame do celular */
body.ph3a-force-mobile .ph3a-wrapper {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  /* transform cria novo stacking context — fixed children ficam contidos aqui */
  transform: translate(-50%, -50%) !important;
  width: 393px !important;
  height: min(852px, 88vh) !important;
  min-height: unset !important;
  border-radius: 44px !important;
  overflow: hidden !important;
  /* Bezel: camadas de sombra simulam a moldura do celular */
  box-shadow:
    0 0 0 2px #1e2d4a,
    0 0 0 10px #162038,
    0 0 0 12px #1e2d4a,
    0 0 0 13px #253560,
    0 60px 130px rgba(0,0,0,0.9),
    inset 0 0 0 1px rgba(255,255,255,0.06) !important;
  z-index: 9000 !important;
}

/* Notch decoration */
body.ph3a-force-mobile .ph3a-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #0a1628;
  border-radius: 0 0 20px 20px;
  z-index: 9999;
  pointer-events: none;
}

/* Barra home (bottom) */
body.ph3a-force-mobile .ph3a-wrapper::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  z-index: 9999;
  pointer-events: none;
}

/* Sidebar: position:fixed fica relativo ao wrapper transformado */
body.ph3a-force-mobile .ph3a-sidebar {
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  width: var(--sidebar-width) !important;
  transform: translateX(-100%);
  z-index: 1050;
}
body.ph3a-force-mobile .ph3a-sidebar.open {
  transform: translateX(0);
}

/* Main: sem margem da sidebar */
body.ph3a-force-mobile .ph3a-main {
  margin-left: 0 !important;
  min-height: unset !important;
  height: 100% !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Topbar: position:fixed fica relativo ao wrapper */
body.ph3a-force-mobile .ph3a-topbar {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  padding: 0 16px !important;
}

/* Conteúdo com scroll interno */
body.ph3a-force-mobile .ph3a-content {
  flex: 1;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px 32px !important;
  height: calc(100% - var(--topbar-height));
  margin-top: 0;
}

/* Topbar: esconde título, mostra toggle e ações */
body.ph3a-force-mobile .sidebar-toggle { display: flex !important; }
body.ph3a-force-mobile .topbar-title   { display: none !important; }
body.ph3a-force-mobile .topbar-actions { margin-left: auto !important; }

/* Page header empilhado */
body.ph3a-force-mobile .page-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Cards com padding reduzido */
body.ph3a-force-mobile .metric-card { padding: 14px !important; }

/* Kanban com scroll horizontal */
body.ph3a-force-mobile .kanban-board {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  flex-wrap: nowrap !important;
}
body.ph3a-force-mobile .kanban-column {
  min-width: 260px !important;
  width: 260px !important;
  scroll-snap-align: start;
  max-height: none !important;
  flex-shrink: 0 !important;
}

/* Tabelas com scroll horizontal */
body.ph3a-force-mobile .ph3a-table-card > table,
body.ph3a-force-mobile .ph3a-table-card .table-responsive,
body.ph3a-force-mobile .ph3a-table-card > .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  width: 100%;
}
body.ph3a-force-mobile .ph3a-table    { font-size: 12px; }
body.ph3a-force-mobile .ph3a-table td,
body.ph3a-force-mobile .ph3a-table th { padding: 10px !important; }

/* Colunas Bootstrap colapsam para 100% */
body.ph3a-force-mobile .row > [class*="col-md-"],
body.ph3a-force-mobile .row > [class*="col-lg-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

/* Inputs sem zoom iOS */
body.ph3a-force-mobile input,
body.ph3a-force-mobile select,
body.ph3a-force-mobile textarea {
  font-size: 16px !important;
}



