body { outline: 8px solid red !important; }
:root{
  --bg1:#f2f4f7;
  --bg2:#e9ecef;
  --card:#ffffff;
  --borda:#e5e7eb;
  --txt:#0b0b0b;

  --verde:#16a34a;
  --laranja:#f59e0b;
  --roxo:#7c3aed;
  --vermelho:#dc2626;
}

*{ box-sizing:border-box; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; }
body{ margin:0; background: linear-gradient(180deg,var(--bg1),var(--bg2)); color:var(--txt); }
.hidden{ display:none !important; }

.tela{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px; }
.tela-app{
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  flex-direction: column;
}

.container{
  width:100%;
  max-width: 980px;
  margin: 0 auto;
}

.login-card{
  width:min(520px, 100%);
  background:var(--card);
  border:1px solid var(--borda);
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.topo-login{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.sub{ font-weight:900; font-size:20px; }

.logo-img{ display:block; width:auto; height:auto; }
.logo-login{ height:56px; max-width: 220px; object-fit: contain; }
.logo-header{ height:34px; max-width: 140px; object-fit: contain; }

.header{
  height:64px;
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--borda);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  position:sticky;
  top:0;
  z-index:5;
}

.header-left{ display:flex; align-items:center; gap:10px; }
.logo-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  padding:6px 8px;
  border-radius:12px;
}
.logo-btn:hover{ background:rgba(0,0,0,.06); }

.header-title{ font-size:18px; font-weight:900; }

.header-right{ display:flex; gap:10px; }
.icon-btn{
  border:none;
  background:transparent;
  font-size:18px;
  cursor:pointer;
  padding:8px 10px;
  border-radius:12px;
}
.icon-btn:hover{ background:rgba(0,0,0,.06); }

.btn-sair{
  border:none;
  background:transparent;
  color: var(--vermelho);
  font-weight:900;
  cursor:pointer;
  padding:8px 10px;
  border-radius:12px;
}
.btn-sair:hover{ background:rgba(220,38,38,.08); }

.conteudo{
  padding:14px;
  padding-bottom:92px;
}

.campo{ display:flex; flex-direction:column; gap:6px; margin:10px 0; }
label{ font-weight:900; font-size:14px; }
input, textarea, select{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--borda);
  background:#fff;
  font-size:16px;
  font-weight:600;
  outline:none;
}
textarea{ resize:vertical; }

.btn-primario{
  width:100%;
  padding:14px 12px;
  border:none;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  background:#000;
  color:#fff;
  margin-top:10px;
}
.btn-secundario{
  width:100%;
  padding:14px 12px;
  border:1px solid #000;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  background:#fff;
  color:#000;
  margin-top:10px;
}

.linha-botoes{ display:flex; gap:10px; }
@media (max-width: 560px){
  .linha-botoes{ flex-direction:column; }
}

.erro{ color:#b91c1c; font-weight:900; margin-top:10px; }
.mini-info{ margin-top:10px; font-size:12px; font-weight:800; opacity:.75; }

.searchbar{
  background:#fff;
  border:1px solid var(--borda);
  border-radius:26px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  box-shadow:0 10px 20px rgba(0,0,0,.06);
}
.searchbar input{
  border:none;
  padding:0;
  font-size:18px;
  font-weight:700;
  width:100%;
}
.searchbar input:focus{ outline:none; }

.filtros{
  display:flex;
  gap:10px;
  margin:10px 0 12px 0;
}
.dot{
  width:34px; height:34px;
  border-radius:999px;
  border:2px solid #fff;
  box-shadow:0 10px 16px rgba(0,0,0,.10);
  cursor:pointer;
}
.dot.on{ border:3px solid #000; }

.btn-top{
  height:52px;
  border-radius:14px;
  border:none;
  background:#000;
  color:#fff;
  font-weight:900;
  width:100%;
  cursor:pointer;
  margin:10px 0 14px 0;
}

.card{
  background:rgba(255,255,255,.98);
  border:1px solid var(--borda);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  margin-bottom:14px;
  cursor:pointer;
}
.card-body{ padding:14px 16px 10px 16px; }
.card-top{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  font-weight:900;
}
.card-escola{
  margin:8px 0 10px 0;
  font-size:28px;
  font-weight:900;
  letter-spacing:-.5px;
  line-height:1;
}
@media (max-width: 560px){
  .card-escola{ font-size:22px; }
}

.linha{ display:flex; gap:8px; font-size:18px; margin-bottom:4px; }
.linha .k{ font-weight:900; }
.linha .v{ font-weight:700; }

.footer-status{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#fff;
  font-weight:900;
  font-size:20px;
}
.bolinha{ width:14px; height:14px; background:#fff; border-radius:999px; }

.bottom-nav{
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  background:rgba(255,255,255,.92);
  border-top:1px solid var(--borda);
  display:flex;
  justify-content:space-around;
  padding:10px 8px;
}
.nav-item{
  border:none;
  background:transparent;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  font-size:18px;
  font-weight:900;
  color:#111;
  opacity:.55;
}
.nav-item span{ font-size:12px; font-weight:900; }
.nav-item.active{ opacity:1; }

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  z-index:10;
}
.modal-card{
  width:min(560px, 100%);
  background:#fff;
  border-radius:18px;
  border:1px solid var(--borda);
  box-shadow:0 10px 26px rgba(0,0,0,.18);
  padding:14px;
}
.modal-wide{ width:min(980px, 100%); }

.modal-topo{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.modal-titulo{ font-size:18px; font-weight:900; }

.lista-notifs{ margin-top:12px; display:flex; flex-direction:column; gap:10px; }
.notif{
  border:1px solid var(--borda);
  border-radius:14px;
  padding:12px;
  font-weight:800;
}
.notif small{ display:block; opacity:.7; margin-top:6px; font-weight:800; }

.resumo-final{
  border:1px solid var(--borda);
  border-radius:14px;
  padding:12px;
  font-weight:900;
  margin:10px 0;
  background:#fafafa;
}

.admin-actions{
  display:flex;
  gap:10px;
  margin-top:12px;
}
.btn-mini{
  flex:1;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--borda);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}
.btn-mini.danger{
  border:1px solid var(--vermelho);
  color: var(--vermelho);
}
.btn-mini.danger:hover{
  background:rgba(220,38,38,.07);
}

.detalhes{
  margin-top:12px;
  border:1px solid var(--borda);
  border-radius:14px;
  padding:12px;
  background:#fafafa;
}
.detalhes h2{ margin:0 0 10px 0; font-size:20px; font-weight:900; }
.detalhes .grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
@media (min-width: 860px){
  .detalhes .grid{ grid-template-columns: 1fr 1fr; }
}
.foto{
  width:100%;
  border-radius:14px;
  border:1px solid var(--borda);
  overflow:hidden;
  background:#fff;
}
.foto img{ width:100%; display:block; }
.gps{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.gps b{ font-size:14px; }
.gps .gps-btn{
  border:1px solid var(--borda);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  cursor:pointer;
  font-weight:900;
}
/* ===== Header responsivo (override) ===== */
.header{
  height: 64px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--borda);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.header-title-left{
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right{
  display:flex;
  align-items:center;
  gap: 8px;
}

/* Em celular, diminui um pouco */
@media (max-width: 520px){
  .header{ height: 60px; padding: 0 10px; }
  .logo-header{ height: 28px; max-width: 110px; }
  .header-title-left{ font-size: 16px; }
  .btn-sair{ padding: 8px 8px; }
}

/* ===== Layout responsivo geral ===== */
.conteudo{
  padding: 14px;
  padding-bottom: 92px;
}

@media (max-width: 768px){
  .conteudo{ padding: 12px; padding-bottom: 92px; }
  .container{ max-width: 640px; }
}

@media (max-width: 520px){
  .conteudo{ padding: 10px; padding-bottom: 92px; }
  .container{ max-width: 100%; }
  .searchbar{ padding: 10px 12px; border-radius: 18px; }
  .searchbar input{ font-size: 16px; }
  .btn-top{ height: 50px; }
}

/* Cards mais fluidos no mobile */
.card{ width: 100%; }
.card-escola{
  word-break: break-word;
}

/* Barra inferior mais confortável no mobile */
.bottom-nav{
  padding: 10px 6px;
}
.nav-item{
  font-size: 18px;
}
.nav-item span{
  font-size: 11px;
}
/* ===== Login: logo central + texto abaixo ===== */
.topo-login{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.logo-login{
  height: 64px;          /* ajuste fino do tamanho do logo */
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.topo-login .sub{
  font-size: 16px;       /* fonte menor */
  font-weight: 900;
  margin-top: 2px;
}

/* Mobile: mais compacto */
@media (max-width: 520px){
  .logo-login{
    height: 56px;
    max-width: 200px;
  }
  .topo-login .sub{
    font-size: 15px;
  }
}

/* ===== HEADER FIXO NO TOPO (corrige header no meio da tela) ===== */
.header{
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--borda);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 14px;
}

.header-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-btn{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
}
.logo-btn:hover{ background: rgba(0,0,0,.06); }

.logo-img{
  height: 34px;
  width: auto;
  display: block;
}

.header-title{
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.header-right{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  padding: 8px 10px;
  border-radius: 10px;
}
.icon-btn:hover{ background: rgba(0,0,0,.06); }

.btn-sair{
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  color: #d10000;
  padding: 8px 10px;
  border-radius: 10px;
}
.btn-sair:hover{ background: rgba(209,0,0,.08); }

/* Conteúdo do app não “cola” no header */
#tela-app{
  padding-top: 8px;
}

/* Mobile: compacta o header */
@media (max-width: 520px){
  .logo-img{ height: 30px; }
  .header-title{ font-size: 16px; }
  .btn-sair{ padding: 6px 8px; }
  .icon-btn{ padding: 6px 8px; }
}
/* ===== FIX DEFINITIVO: HEADER NO TOPO DA TELA (FULL WIDTH) ===== */
.header{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;     /* força tela inteira */
  z-index: 99999 !important;
}

/* empurra o conteúdo pra não ficar atrás do header */
.conteudo{
  padding-top: 78px !important;
}

/* garante que o container não empurre o header */
.container{
  position: relative;
}
/* Modal detalhes OS: topo fixo + rolagem */
#modal-os .modal-card{
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#modal-os .modal-top{
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 10px;
  z-index: 2;
  border-bottom: 1px solid var(--borda);
}

#os-detalhes{
  overflow: auto;
  padding-top: 12px;
}

/* Botão X visível */
.x{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 10px;
}
.x:hover{ background: rgba(0,0,0,.06); }

/* ===== CTA fixo no card (logo acima da barra de status) ===== */
.cta-fixo-wrap{
  padding: 10px 14px 0 14px;
}

.cta-fixo{
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 16px;
  font-weight: 1000;
  font-size: 18px;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.cta-fixo.andamento{ background: var(--laranja); }
.cta-fixo.alerta{ background: var(--roxo); }
.cta-fixo.atrasada{ background: var(--vermelho); }

.cta-fixo:hover{ filter: brightness(.98); }
.cta-fixo:active{ transform: translateY(1px); }

@media (max-width: 520px){
  .cta-fixo{ height: 60px; font-size: 18px; }
}
/* ===== CONCLUIR PROGRAMADA: sempre preto ===== */
.cta-fixo{
  background: #000 !important;
  color: #fff !important;
}

/* garante que as variações não mudem a cor */
.cta-fixo.andamento,
.cta-fixo.alerta,
.cta-fixo.atrasada{
  background: #000 !important;
  color: #fff !important;
}
/* ===== Dashboard: aumentar gráfico só no PC ===== */
@media (min-width: 1024px){
  /* a “caixa” onde o canvas está dentro do card do dashboard */
  .admin-dashboard .foto{
    height: 420px;       /* ajuste aqui */
    display: flex;
    flex-direction: column;
  }

  .admin-dashboard canvas{
    flex: 1;
    width: 100% !important;
    height: 100% !important;
  }
}