:root{
  --tps-blue-900:#061a2f;
  --tps-blue-700:#0f3c67;
  --tps-cyan:#31b6ff;
}
body{background:#f5f7fb;}
.navbar{background: linear-gradient(135deg, var(--tps-blue-900), var(--tps-blue-700));}
.brand-logo{height:44px; border-radius:14px;}
.card-kpi{border:0; box-shadow:0 10px 30px rgba(0,0,0,.06); border-radius:18px;}
.card-kpi .icon{
  width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(49,182,255,.12); color: var(--tps-blue-700);
}
.table thead th{font-size:.86rem; color:#667085;}
.badge-soft{background:rgba(49,182,255,.12); color: var(--tps-blue-700); border:1px solid rgba(49,182,255,.2);}
.badge-danger-soft{background:rgba(240,68,56,.10); color:#b42318; border:1px solid rgba(240,68,56,.18);}
.badge-warn-soft{background:rgba(247,144,9,.12); color:#b54708; border:1px solid rgba(247,144,9,.2);}
.badge-ok-soft{background:rgba(18,183,106,.12); color:#027a48; border:1px solid rgba(18,183,106,.2);}
.page-title{font-weight:700; letter-spacing:-.02em;}
.small-muted{color:#667085;}

/* Keep action buttons aligned in tables (e.g., Inspeções realizadas) */
.actions-cell{white-space:nowrap; width:1%; min-width:120px;}
.actions-wrap form{margin:0;}
.actions-wrap .btn{line-height:1;}


/* Login split layout */
body.login-split{background:#f6f8fc;}
.login-left{background: url('/assets/img/login_bg.jpg') center/cover no-repeat; position:relative;}
.login-left-overlay{position:absolute; inset:0; background: linear-gradient(135deg, rgba(6,26,47,.88), rgba(15,60,103,.55));}

/* UI polish */
.table> :not(caption)>*>*{padding: .9rem .9rem;}
.table-hover tbody tr:hover{background: rgba(49,182,255,.06);}
.btn{border-radius:12px;}
.form-control, .form-select{border-radius:12px;}
.card-kpi{overflow:hidden;}
.empty-state{
  border:1px dashed rgba(15,60,103,.25);
  border-radius:18px;
  background: #fff;
  padding: 28px;
  text-align:center;
}
.empty-state i{font-size:38px; color: rgba(15,60,103,.7);}

/* Dashboard hero */
.hero{
  background: radial-gradient(1200px 420px at 20% -10%, rgba(49,182,255,.35), transparent 60%),
              linear-gradient(135deg, #061a2f, #0f3c67);
  border-radius: 22px;
  color: #fff;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
.hero .small-muted{color: rgba(255,255,255,.7) !important;}
.chart-card{
  border:0; border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

/* Dashboard charts: make canvases fill the card area */
.dashboard-chart-wrap{
  position: relative;
  min-height: 320px;
}
.dashboard-chart-wrap canvas{
  width: 100% !important;
  height: 100% !important;
  display: block;
}
@media (max-width: 991.98px){
  .dashboard-chart-wrap{ min-height: 260px; }
}


/* Ensure muted text is readable on light cards */
.card .small-muted{ color:#6b7280 !important; }

/* Bottom-sheet modal (mobile friendly) */
.modal.modal-bottomsheet .modal-dialog{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}
.modal.modal-bottomsheet .modal-content{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

/* Mobile checklist cards */
.check-card{
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  background:#fff;
  padding:12px;
}
.check-card .check-title{
  font-weight:800;
  font-size:1.02rem;
}
.check-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.check-meta .form-select{ min-width: 160px; }
.check-photo input[type=file]{ width:100%; }
@media (max-width: 575.98px){
  .check-meta .form-select{ width: 100%; min-width: unset; }
}
.public-table td{ vertical-align: top; }
.public-table td.item-label{
  font-weight:800;
  font-size:1.02rem;
}




@media (max-width: 991.98px){
  .login-split{background: url('/assets/img/login_bg.jpg') center/cover no-repeat;}
  .login-split:before{
    content:'';
    position:fixed; inset:0;
    background: linear-gradient(135deg, rgba(6,26,47,.88), rgba(15,60,103,.55));
    z-index:-1;
  }
}


/* Navbar tweaks */
.navbar-nav .nav-link{ white-space:nowrap; }
.navbar .navbar-nav{ gap:.25rem; }


/* PWA (App instalado) */
@media (display-mode: standalone) {
  .navbar .brand-logo { height: 48px !important; width: auto !important; }
}

/* Navbar: evitar quebra */
.navbar .nav-link { white-space: nowrap; }
.navbar .navbar-nav { gap: .35rem; }


/* Resultado (Conforme / Não Conforme / N/A / Ressalvas) */
.res-pill{display:inline-block;padding:3px 10px;border-radius:999px;border:1px solid #e5e7eb;font-weight:700;font-size:12px}
.res-pill.ok{background:rgba(18,183,106,.12);color:#027a48;border-color:rgba(18,183,106,.25)}
.res-pill.bad{background:rgba(240,68,56,.10);color:#b42318;border-color:rgba(240,68,56,.20)}
.res-pill.warn{background:rgba(247,144,9,.12);color:#b54708;border-color:rgba(247,144,9,.22)}
.res-pill.na{background:#f3f4f6;color:#374151;border-color:#e5e7eb}
