/* SIGMA CULTURA 4.1.x · UX mobile 4.27
 * Camada exclusivamente visual/comportamental para telas pequenas.
 * Não altera regras de negócio, dados, formulários ou fluxos de servidor.
 */
.sigma-mobile-bottom-nav,.sigma-mobile-sheet,.sigma-mobile-filter-toggle{display:none}

@media(max-width:760px){
  html{scroll-padding-bottom:94px}
  body.sigma-mobile-app{padding-bottom:calc(82px + env(safe-area-inset-bottom));background:#f7fafc}

  /* Cabeçalho compacto de aplicativo */
  body.sigma-mobile-app .top{top:0}
  body.sigma-mobile-app .topin{min-height:62px;gap:10px}
  body.sigma-mobile-app .brand-logo-wrap{width:128px!important;min-width:128px!important}
  body.sigma-mobile-app .brand-logo{width:128px!important;max-width:128px!important;height:auto}
  body.sigma-mobile-app .brand-copy{display:none!important}
  body.sigma-mobile-app .top .nav{display:none!important}
  body.sigma-mobile-app .panel{padding-top:14px;padding-bottom:24px}

  /* A navegação horizontal de desktop some; a barra inferior assume o papel. */
  body.sigma-mobile-app .panel>.side{display:none!important}

  /* Hero executivo mais enxuto */
  body.sigma-mobile-app .v249-command-hero{min-height:0;padding:19px 18px;border-radius:18px;margin-bottom:14px}
  body.sigma-mobile-app .v249-command-hero .eyebrow{font-size:11px;letter-spacing:.10em}
  body.sigma-mobile-app .v249-command-hero h1{font-size:28px;line-height:1.06;margin:7px 0 9px}
  body.sigma-mobile-app .v249-command-hero p{font-size:14px;line-height:1.42;margin:0;max-width:none}
  body.sigma-mobile-app .v249-command-art{display:none!important}
  body.sigma-mobile-app .v249-hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}
  body.sigma-mobile-app .v249-hero-actions .btn{width:100%;min-height:44px;padding:9px 10px;font-size:13px}

  /* Filtro recolhível */
  .sigma-mobile-filter-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:12px 14px;border:1px solid #dbe6ec;border-radius:14px;background:#fff;color:#173b58;font:inherit;text-align:left;box-shadow:0 7px 20px rgba(1,84,161,.055)}
  .sigma-mobile-filter-toggle strong{font-size:14px}
  .sigma-mobile-filter-toggle small{display:block;margin-top:2px;color:#6e8290;font-size:11.5px;line-height:1.3;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100vw - 105px)}
  .sigma-mobile-filter-toggle .sigma-filter-chevron{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#eef7fa;color:#075a93;transition:transform .16s ease}
  .sigma-mobile-filter-toggle[aria-expanded="true"] .sigma-filter-chevron{transform:rotate(180deg)}
  body.sigma-mobile-app .v249-global-filter{margin:0 0 14px;padding:14px;grid-template-columns:1fr!important;border-radius:16px;box-shadow:none}
  body.sigma-mobile-app .v249-global-filter.sigma-filter-collapsed{display:none!important}
  body.sigma-mobile-app .v249-global-filter label{font-size:12.5px}
  body.sigma-mobile-app .v249-global-filter input,
  body.sigma-mobile-app .v249-global-filter select{min-height:44px;font-size:14px}
  body.sigma-mobile-app .v249-global-filter .btn{min-height:44px;width:100%}

  /* KPIs: duas colunas, mantendo valores financeiros largos em linha própria. */
  body.sigma-mobile-app .v249-kpi-grid,
  body.sigma-mobile-app .v249-kpi-grid-6{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;margin-bottom:18px}
  body.sigma-mobile-app .v249-kpi{grid-template-columns:36px minmax(0,1fr);gap:9px;min-height:94px;padding:13px 11px;border-radius:16px;overflow:hidden}
  body.sigma-mobile-app .v249-kpi-art{width:36px;height:36px;border-radius:11px}
  body.sigma-mobile-app .v249-kpi-art .v249-icon,
  body.sigma-mobile-app .v249-kpi-art .v248-icon{width:20px;height:20px}
  body.sigma-mobile-app .v249-kpi-main small{font-size:11.5px;line-height:1.18}
  body.sigma-mobile-app .v249-kpi-main strong,
  body.sigma-mobile-app .v260-kpi-money .v249-kpi-main strong{font-size:22px!important;line-height:1.03;white-space:normal;overflow-wrap:anywhere}
  body.sigma-mobile-app .v249-kpi-main em{display:none}
  body.sigma-mobile-app .v249-kpi-arrow{display:none}
  body.sigma-mobile-app .v260-kpi-money{grid-column:1/-1}

  /* Cards e ações com toque confortável */
  body.sigma-mobile-app .card{border-radius:16px;padding:16px}
  body.sigma-mobile-app .btn{min-height:44px}
  body.sigma-mobile-app input,
  body.sigma-mobile-app select,
  body.sigma-mobile-app textarea{font-size:16px}
  body.sigma-mobile-app .v249-main-grid,
  body.sigma-mobile-app .v249-bottom-grid{gap:14px}
  body.sigma-mobile-app .section{padding-top:26px;padding-bottom:26px}

  /* Barra inferior */
  .sigma-mobile-bottom-nav{position:fixed;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:9000;display:grid;grid-template-columns:repeat(4,1fr);min-height:64px;padding:6px;border:1px solid rgba(7,78,126,.14);border-radius:20px;background:rgba(255,255,255,.95);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 16px 38px rgba(5,38,67,.18)}
  .sigma-mobile-bottom-nav a,
  .sigma-mobile-bottom-nav button{appearance:none;border:0;background:transparent;color:#607487;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:4px 2px;border-radius:14px;font:inherit;cursor:pointer}
  .sigma-mobile-bottom-nav svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .sigma-mobile-bottom-nav span{max-width:100%;font-size:10.5px;font-weight:750;line-height:1.05;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sigma-mobile-bottom-nav a.is-active{background:linear-gradient(135deg,#e9f6f5,#edf5fb);color:#075a93}
  .sigma-mobile-bottom-nav button.sigma-more{color:#37556b}

  /* Menu Mais */
  .sigma-mobile-sheet{position:fixed;inset:0;z-index:9100;display:none;background:rgba(3,24,42,.38);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
  .sigma-mobile-sheet.is-open{display:block}
  .sigma-mobile-sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:min(76vh,680px);overflow:auto;padding:10px 14px calc(18px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#fff;box-shadow:0 -18px 50px rgba(2,30,52,.24)}
  .sigma-mobile-sheet-grip{width:42px;height:5px;margin:2px auto 12px;border-radius:999px;background:#d4dee5}
  .sigma-mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 3px 10px}
  .sigma-mobile-sheet-head strong{font-size:18px;color:#173b58}
  .sigma-mobile-sheet-close{width:38px;height:38px;border:1px solid #dce6eb;border-radius:12px;background:#fff;color:#28495f;font-size:22px;line-height:1}
  .sigma-mobile-sheet-links{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .sigma-mobile-sheet-links .side-section-label{grid-column:1/-1;display:block!important;margin:12px 2px 3px;color:#81919c;font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;font-weight:800}
  .sigma-mobile-sheet-links a{display:flex;align-items:center;min-height:48px;padding:10px 11px;border:1px solid #e1eaee;border-radius:13px;background:#fbfdfd;color:#294b61;text-decoration:none;font-size:13px;font-weight:700;line-height:1.2}
  .sigma-mobile-sheet-links a.is-active{border-color:#bcd9df;background:#edf7f7;color:#075a93}
  .sigma-mobile-sheet-links a.sigma-mobile-logout{grid-column:1/-1;justify-content:center;margin-top:6px;border-color:#eed3d3;background:#fff7f7;color:#9a3737}
  body.sigma-sheet-open{overflow:hidden}
}

@media(max-width:430px){
  body.sigma-mobile-app .v249-command-hero h1{font-size:26px}
  body.sigma-mobile-app .v249-hero-actions{grid-template-columns:1fr 1fr}
  .sigma-mobile-sheet-links{grid-template-columns:1fr}
  .sigma-mobile-sheet-links .side-section-label,
  .sigma-mobile-sheet-links a.sigma-mobile-logout{grid-column:1}
}
