:root {
  --bg:#f4f7fb;
  --surface:#fff;
  --surface2:#f8fafc;
  --text:#122033;
  --muted:#64748b;
  --line:#dfe7f1;
  --navy:#0b1f33;
  --blue:#1f6feb;
  --blue2:#e8f1ff;
  --green:#1f9d65;
  --green2:#e8f8f0;
  --yellow:#c98200;
  --yellow2:#fff5d8;
  --red:#d9363e;
  --red2:#ffe8e9;
  --shadow:0 10px 35px rgba(15,31,51,.08);
  --radius:16px
}
* {
  box-sizing:border-box
}
html,body {
  margin:0;
  min-height:100%;
  font-family:Inter,system-ui,sans-serif;
  background:var(--bg);
  color:var(--text)
}
button,input,select,textarea {
  font:inherit
}
.app-shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:260px 1fr
}
.sidebar {
  position:sticky;
  top:0;
  height:100vh;
  background:linear-gradient(180deg,#0a2036,#0c2944);
  color:#fff;
  padding:22px 16px;
  display:flex;
  flex-direction:column;
  z-index:30
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  padding:5px 8px 24px
}
.brand-mark {
  width:44px;
  height:44px;
  border-radius:13px;
  background:#fff;
  color:#0b1f33;
  display:grid;
  place-items:center;
  font-weight:800
}
.brand strong,.brand span {
  display:block
}
.brand span {
  font-size:12px;
  opacity:.72;
  margin-top:3px
}
.nav {
  display:grid;
  gap:7px
}
.nav-item {
  border:0;
  background:transparent;
  color:#d7e3ef;
  border-radius:12px;
  padding:13px 14px;
  text-align:left;
  display:flex;
  gap:11px;
  align-items:center;
  cursor:pointer
}
.nav-item:hover,.nav-item.active {
  background:rgba(255,255,255,.12);
  color:#fff
}
.sidebar-footer {
  margin-top:auto;
  font-size:11px;
  opacity:.55;
  padding:8px
}
.main {
  min-width:0
}
.topbar {
  height:84px;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  position:sticky;
  top:0;
  z-index:20
}
.topbar h1 {
  font-size:21px;
  margin:0
}
.topbar p {
  font-size:12px;
  color:var(--muted);
  margin:4px 0 0
}
.user-chip {
  display:flex;
  align-items:center;
  gap:10px
}
.user-chip strong,.user-chip span {
  display:block
}
.user-chip span {
  font-size:11px;
  color:var(--muted);
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis
}
.avatar {
  width:38px;
  height:38px;
  border-radius:50%;
  background:var(--navy);
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:700
}
.content {
  padding:28px
}
.grid {
  display:grid;
  gap:18px
}
.kpi-grid {
  grid-template-columns:repeat(6,minmax(145px,1fr))
}
.card {
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius)
}
.kpi {
  padding:18px;
  min-height:118px;
  display:flex;
  flex-direction:column;
  justify-content:space-between
}
.kpi .label {
  font-size:12px;
  color:var(--muted);
  font-weight:600
}
.kpi strong {
  font-size:31px
}
.kpi small {
  font-size:11px;
  color:var(--muted)
}
.section {
  margin-top:20px
}
.section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px
}
.section-head h2 {
  font-size:16px;
  margin:0
}
.toolbar {
  display:flex;
  gap:10px;
  flex-wrap:wrap
}
.btn {
  border:0;
  border-radius:11px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer
}
.btn-primary {
  background:var(--blue);
  color:#fff
}
.btn-secondary {
  background:#eef3f8;
  color:var(--text)
}
.btn-danger {
  background:var(--red2);
  color:var(--red)
}
.icon-btn {
  border:1px solid var(--line);
  background:#fff;
  border-radius:10px;
  width:40px;
  height:40px;
  cursor:pointer
}
.filters {
  padding:14px;
  display:grid;
  grid-template-columns:minmax(220px,2fr) repeat(3,minmax(150px,1fr)) auto;
  gap:10px;
  align-items:center
}
.input,.select,.textarea {
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:11px;
  padding:11px 12px;
  outline:none
}
.input:focus,.select:focus,.textarea:focus {
  border-color:#8bb5f7;
  box-shadow:0 0 0 3px rgba(31,111,235,.10)
}
.table-card {
  overflow:hidden
}
.table-wrap {
  overflow:auto
}
.data-table {
  width:100%;
  border-collapse:collapse;
  min-width:980px
}
.data-table th {
  position:sticky;
  top:0;
  background:#f7f9fc;
  color:#536273;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.02em;
  text-align:left;
  padding:12px;
  border-bottom:1px solid var(--line);
  white-space:nowrap
}
.data-table td {
  padding:11px 12px;
  border-bottom:1px solid #edf1f5;
  font-size:12px;
  vertical-align:middle
}
.data-table tr:hover td {
  background:#fafcff
}
.badge {
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  white-space:nowrap
}
.s-open {
  background:#eef2f7
}
.s-orc {
  background:var(--blue2);
  color:#175dc0
}
.s-vis {
  background:var(--yellow2);
  color:#8a5a00
}
.s-ok {
  background:var(--green2);
  color:#187548
}
.s-cancel {
  background:var(--red2);
  color:#bd2b32
}
.s-final {
  background:#e9f7ec;
  color:#23713d
}
.priority-Urgente {
  color:var(--red);
  font-weight:800
}
.priority-Alta {
  color:#d96d00;
  font-weight:700
}
.empty {
  padding:42px;
  text-align:center;
  color:var(--muted)
}
.split {
  grid-template-columns:1.3fr .7fr
}
.metric-list {
  padding:8px 18px
}
.metric-row {
  display:grid;
  grid-template-columns:1.5fr repeat(7,.7fr);
  gap:8px;
  padding:11px 0;
  border-bottom:1px solid #edf1f5;
  font-size:12px;
  align-items:center
}
.metric-row.head {
  font-size:10px;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700
}
.metric-row strong {
  text-align:center
}
.recent-list {
  padding:7px 18px
}
.recent-item {
  padding:12px 0;
  border-bottom:1px solid #edf1f5
}
.recent-item strong {
  font-size:12px
}
.recent-item p {
  font-size:11px;
  color:var(--muted);
  margin:4px 0
}
.modal-backdrop {
  position:fixed;
  inset:0;
  background:rgba(8,18,32,.62);
  display:grid;
  place-items:center;
  padding:18px;
  z-index:100
}
.modal {
  width:min(1000px,100%);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:20px;
  box-shadow:0 35px 90px rgba(0,0,0,.25)
}
.modal-head {
  position:sticky;
  top:0;
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:18px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  z-index:2
}
.modal-head h3 {
  margin:0;
  font-size:18px
}
.modal-body {
  padding:22px
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px
}
.field {
  display:flex;
  flex-direction:column;
  gap:6px
}
.field label {
  font-size:11px;
  color:#536273;
  font-weight:700
}
.field.span2 {
  grid-column:span 2
}
.field.span4 {
  grid-column:1/-1
}
.textarea {
  min-height:88px;
  resize:vertical
}
.modal-actions {
  padding:16px 22px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:flex-end;
  gap:10px;
  position:sticky;
  bottom:0;
  background:#fff
}
.toast-host {
  position:fixed;
  right:18px;
  top:18px;
  z-index:200;
  display:grid;
  gap:10px
}
.toast {
  min-width:260px;
  max-width:390px;
  background:#122033;
  color:#fff;
  border-radius:12px;
  padding:12px 14px;
  box-shadow:var(--shadow);
  font-size:12px
}
.toast.error {
  background:#9f2026
}
.loading-screen {
  position:fixed;
  inset:0;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  background:#f4f7fb;
  z-index:300
}
.spinner {
  width:28px;
  height:28px;
  border:3px solid #cdd7e5;
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .8s linear infinite
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
.mobile-only {
  display:none
}
@media(max-width:1200px) {
  .kpi-grid {
    grid-template-columns:repeat(3,1fr)
  }
  .split {
    grid-template-columns:1fr
  }
  .filters {
    grid-template-columns:1fr 1fr 1fr
  }
}
@media(max-width:820px) {
  .app-shell {
    display:block
  }
  .sidebar {
    position:fixed;
    left:-280px;
    width:260px;
    transition:.25s
  }
  .sidebar.open {
    left:0
  }
  .main {
    width:100%
  }
  .mobile-only {
    display:inline-grid;
    place-items:center
  }
  .topbar {
    height:72px;
    padding:0 14px;
    justify-content:flex-start;
    gap:12px
  }
  .topbar-actions {
    margin-left:auto
  }
  .user-chip>div:not(.avatar) {
    display:none
  }
  .content {
    padding:16px
  }
  .kpi-grid {
    grid-template-columns:repeat(2,1fr);
    gap:12px
  }
  .kpi {
    min-height:105px;
    padding:15px
  }
  .kpi strong {
    font-size:27px
  }
  .filters {
    grid-template-columns:1fr;
    padding:12px
  }
  .form-grid {
    grid-template-columns:1fr 1fr
  }
  .field.span4 {
    grid-column:1/-1
  }
  .metric-list {
    overflow:auto
  }
  .metric-row {
    min-width:780px
  }
  .modal-backdrop {
    padding:0
  }
  .modal {
    width:100%;
    height:100%;
    max-height:100vh;
    border-radius:0
  }
  .modal-body {
    padding:16px
  }
  .modal-head {
    padding:15px 16px
  }
  .modal-actions {
    padding:12px 16px
  }
}
@media(max-width:520px) {
  .kpi-grid {
    grid-template-columns:1fr 1fr
  }
  .form-grid {
    grid-template-columns:1fr
  }
  .field.span2,.field.span4 {
    grid-column:1
  }
  .content {
    padding:12px
  }
  .section-head {
    align-items:flex-start;
    flex-direction:column
  }
  .toolbar {
    width:100%
  }
  .toolbar .btn {
    flex:1
  }
  .topbar p {
    display:none
  }
}
[hidden] {
  display:none!important
}
.login-screen {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:radial-gradient(circle at 20% 10%,#183f67 0,#0b1f33 42%,#071522 100%)
}
.login-card {
  width:min(430px,100%);
  background:#fff;
  border-radius:24px;
  padding:30px;
  box-shadow:0 30px 80px rgba(0,0,0,.28)
}
.login-logo {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:26px
}
.login-logo .brand-mark {
  width:52px;
  height:52px;
  background:var(--navy);
  color:#fff
}
.login-logo h1 {
  font-size:20px;
  margin:0
}
.login-logo p {
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px
}
.login-card h2 {
  margin:0 0 6px;
  font-size:22px
}
.login-card>p {
  margin:0 0 22px;
  color:var(--muted);
  font-size:13px
}
.login-form {
  display:grid;
  gap:14px
}
.login-form label {
  font-size:12px;
  font-weight:700;
  color:#536273;
  display:grid;
  gap:7px
}
.login-btn {
  margin-top:4px;
  height:46px
}
.login-foot {
  margin-top:18px;
  text-align:center;
  color:var(--muted);
  font-size:11px
}
.role-chip {
  display:inline-flex;
  padding:3px 8px;
  border-radius:999px;
  background:#eef3f8;
  color:#486078;
  font-size:10px;
  font-weight:800;
  margin-top:4px
}
.logout-btn {
  border:0;
  background:transparent;
  color:#9fb2c5;
  cursor:pointer;
  text-align:left;
  padding:8px;
  font-size:12px
}
.logout-btn:hover {
  color:#fff
}
.security-note {
  display:flex;
  gap:8px;
  align-items:flex-start;
  margin-top:18px;
  padding:11px;
  border-radius:12px;
  background:#f6f9fc;
  color:#617085;
  font-size:11px
}
.no-write .btn-primary,.no-write #newBtn {
  display:none
}
.install-hint {
  font-size:11px;
  color:var(--muted);
  margin-left:auto
}
.connection-dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2aa66b;
  box-shadow:0 0 0 4px rgba(42,166,107,.12);
  display:inline-block;
  margin-right:7px
}
.s-progress {
  background:#e7edff;
  color:#3949ab
}
.muted {
  color:var(--muted);
  font-size:12px;
  margin:5px 0 0
}
.small-modal {
  width:min(700px,100%)
}
.user-table {
  min-width:850px
}
.tech-summary {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  background:linear-gradient(135deg,#0b1f33,#143f68);
  color:#fff;
  border-radius:18px;
  padding:22px 24px;
  box-shadow:var(--shadow)
}
.tech-summary h2 {
  margin:0;
  font-size:22px
}
.tech-summary p {
  margin:5px 0 0;
  color:#bdd0e4;
  font-size:12px
}
.tech-counts {
  display:flex;
  gap:10px;
  flex-wrap:wrap
}
.tech-counts span {
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  padding:10px 13px;
  border-radius:12px;
  font-size:11px
}
.tech-counts strong {
  font-size:18px;
  margin-right:4px
}
.tech-cards {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px
}
.tech-service,.tech-current {
  padding:20px
}
.tech-current {
  border:2px solid #8bb5f7
}
.tech-card-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start
}
.tech-card-head h3 {
  margin:4px 0 0;
  font-size:18px
}
.eyebrow {
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted)
}
.tech-address {
  font-size:12px;
  color:#45566a;
  margin:14px 0
}
.tech-mini {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0
}
.tech-mini span {
  background:#f3f6fa;
  padding:6px 9px;
  border-radius:9px;
  font-size:10px;
  color:#526173
}
.tech-defect {
  font-size:12px;
  line-height:1.55;
  color:#334155;
  min-height:38px
}
.tech-service .btn {
  width:100%;
  margin-top:10px
}
.tech-detail-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:18px
}
.tech-detail {
  border:1px solid var(--line);
  background:#f8fafc;
  border-radius:12px;
  padding:12px
}
.tech-detail span,.tech-detail strong {
  display:block
}
.tech-detail span {
  font-size:10px;
  color:var(--muted);
  text-transform:uppercase;
  font-weight:700
}
.tech-detail strong {
  font-size:12px;
  margin-top:5px;
  line-height:1.45
}
.tech-actions {
  display:flex;
  justify-content:flex-end;
  margin-top:18px
}
.tech-empty p {
  margin-bottom:0
}
.tech-metric {
  grid-template-columns:1.5fr repeat(7,.7fr)
}
@media(max-width:820px) {
  .tech-summary {
    align-items:flex-start;
    flex-direction:column
  }
  .tech-cards {
    grid-template-columns:1fr
  }
  .tech-detail-grid {
    grid-template-columns:1fr
  }
  .tech-actions .btn {
    width:100%
  }
}
/* NEW FORTALEZA 2.4.2 — PERFIS E MAPA */
.profile-avatar-header242 {
  overflow:hidden
}
.profile-avatar-header242 img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}
.profile-avatar242,.profile-preview242 {
  width:42px;
  height:42px;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 auto;
  background:#0b1f33;
  color:#fff;
  font-weight:800;
  font-size:13px;
  border:2px solid #fff;
  box-shadow:0 2px 8px rgba(15,23,42,.16)
}
.profile-avatar242 img,.profile-preview242 img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}
.profile-preview242 {
  width:86px;
  height:86px;
  font-size:24px;
  border:3px solid #fff;
  box-shadow:0 4px 16px rgba(15,23,42,.18)
}
.profile-avatar-fallback242 {
  background:linear-gradient(135deg,#0b1f33,#1f6feb);
  color:#fff
}
.user-cell242 {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:190px
}
.profile-editor242 {
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:18px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fafc
}
.profile-editor242>div {
  flex:1
}
.profile-remove242 {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
  font-size:12px;
  font-weight:700;
  color:#7f1d1d
}
.team-map-card242 {
  overflow:hidden
}
.team-map242 {
  height:480px;
  width:100%;
  background:#e8eef5
}
.map-legend242 {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  padding:14px 16px;
  border-top:1px solid var(--line);
  background:#fff
}
.map-legend242>div {
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafc
}
.map-legend242 .profile-avatar242 {
  width:34px;
  height:34px;
  font-size:10px
}
.map-legend242 strong,.map-legend242 small {
  display:block
}
.map-legend242 strong {
  font-size:12px
}
.map-legend242 small {
  font-size:10px;
  color:var(--muted);
  margin-top:2px
}
.nf-map-divicon242 {
  background:none!important;
  border:0!important
}
.nf-map-marker242 {
  width:50px;
  height:50px;
  border-radius:50%;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#0b1f33,#1f6feb);
  color:#fff;
  font-weight:900;
  font-size:14px;
  border:4px solid #fff;
  box-shadow:0 5px 18px rgba(15,23,42,.38)
}
.nf-map-marker242 img {
  width:100%;
  height:100%;
  object-fit:cover
}
.map-popup242 {
  min-width:220px;
  font-family:Inter,system-ui,sans-serif
}
.map-popup-head242 {
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:8px
}
.map-popup-head242 strong,.map-popup-head242 span {
  display:block
}
.map-popup-head242 span {
  font-size:11px;
  color:#64748b;
  margin-top:2px
}
.map-popup-photo242 {
  width:48px;
  height:48px;
  border-radius:50%;
  object-fit:cover;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#0b1f33,#1f6feb);
  color:#fff;
  font-weight:800
}
.map-popup242 p {
  margin:5px 0;
  font-size:11px;
  line-height:1.4
}
.map-popup242 a {
  display:inline-block;
  margin-top:7px;
  font-size:11px;
  font-weight:700;
  color:#1565c0;
  text-decoration:none
}
@media(max-width:820px) {
  .team-map242 {
    height:420px
  }
  .profile-editor242 {
    align-items:flex-start;
    flex-direction:column
  }
  .profile-preview242 {
    width:76px;
    height:76px
  }
}
@media(max-width:520px) {
  .team-map242 {
    height:360px
  }
  .map-legend242 {
    display:grid;
    grid-template-columns:1fr
  }
  .map-legend242>div {
    width:100%
  }
}
/* =========================================================    CORREÇÃO DE LAYOUT 2.4.2 — DESKTOP / MOBILE    ========================================================= */
/* No desktop a barra lateral deve permanecer visível, mesmo que o JS antigo    aplique o atributo hidden ao inicializar o menu. */
@media (min-width: 821px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }
  .sidebar,   .sidebar[hidden] {
    display: flex !important;
    position: sticky !important;
    left: auto !important;
    top: 0 !important;
    width: 260px !important;
    height: 100vh !important;
  }
  .main {
    min-width: 0 !important;
    width: 100% !important;
    grid-column: 2 !important;
  }
  .menu-backdrop,   .menu-backdrop[hidden] {
    display: none !important;
  }
}
/* Conteúdo nunca deve comprimir a área principal. */
.main, .content, .grid, .card {
  min-width: 0;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}
/* KPIs mais estáveis em telas largas e médias. */
.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* Dashboard dividido sem espremer a coluna de registros. */
.split {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
}
@media (max-width: 1200px) {
  .split {
    grid-template-columns: 1fr;
  }
}
/* Mobile: menu lateral fora da tela até receber a classe .open. */
@media (max-width: 820px) {
  .app-shell {
    display: block !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important;
    width: 260px !important;
    height: 100vh !important;
    transition: left .25s ease !important;
  }
  .sidebar.open {
    left: 0 !important;
  }
  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 18, 32, .52);
    z-index: 25;
  }
  .main {
    width: 100% !important;
  }
}

/* NEW FORTALEZA 2.5.0 */
.choice-grid250{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.choice-card250{appearance:none;border:1px solid var(--line);background:#fff;border-radius:16px;padding:22px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:8px;min-height:130px;transition:.18s}
.choice-card250:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(15,23,42,.08)}
.choice-card250 strong{font-size:17px;color:var(--text)}
.choice-card250 span{font-size:12px;line-height:1.5;color:var(--muted)}
.choice-card250:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}
.choice-list250{display:flex;flex-direction:column;gap:8px}
.choice-row250{appearance:none;border:1px solid var(--line);background:#fff;border-radius:12px;padding:13px 14px;text-align:left;cursor:pointer;display:flex;justify-content:space-between;gap:10px;align-items:center}
.choice-row250 strong{font-size:13px}.choice-row250 span{font-size:11px;color:var(--muted);text-align:right}
.security-code-row250{display:flex;gap:8px;align-items:center}.security-code-row250 .input{font-weight:900;letter-spacing:.16em;font-size:17px;max-width:180px;text-transform:uppercase}
.selected-box250{border:1px solid var(--line);background:#f8fafc;border-radius:12px;padding:12px 14px;margin:4px 0 10px}
.row-no-tech250{background:#fff5f5}.danger-chip250,.warning-chip250{display:inline-flex;align-items:center;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.03em;padding:4px 8px}
.danger-chip250{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.warning-chip250{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.warning-box250{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:12px}
.photo-actions250{display:flex;gap:8px;flex-wrap:wrap}.removal-question250{border:1px solid var(--line);background:#f8fafc;border-radius:12px;padding:14px}
.budget-item250{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:8px;align-items:end;border:1px solid var(--line);padding:10px;border-radius:12px;margin-bottom:8px}
@media(max-width:820px){.choice-grid250{grid-template-columns:1fr}.choice-row250{flex-direction:column;align-items:flex-start}.choice-row250 span{text-align:left}.security-code-row250{align-items:stretch;flex-direction:column}.security-code-row250 .input{max-width:none}.budget-item250{grid-template-columns:1fr}.photo-actions250 .btn{width:100%}}

/* =========================================================
   NEW FORTALEZA 2.5.2 — CORREÇÃO DA ALTURA DA BARRA LATERAL
   Mantém todo o menu dentro do fundo azul em telas mais baixas
   e permite rolagem interna quando os itens não couberem.
   ========================================================= */

.sidebar {
  box-sizing: border-box !important;
  min-height: 0 !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.24) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.22);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.34);
}

.sidebar-footer {
  flex: 0 0 auto;
  padding-bottom: 10px;
}

/* Desktop */
@media (min-width: 821px) {
  .sidebar,
  .sidebar[hidden] {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Celular/tablet: aplica a mesma proteção de altura ao menu aberto. */
@media (max-width: 820px) {
  .sidebar {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}



/* =========================================================
   NEW FORTALEZA 2.5.2 — IDENTIDADE VISUAL OFICIAL
   Logo original + ícones profissionais do menu
   ========================================================= */

.brand-logo-wrap,
.login-logo .brand-logo-wrap {
  background: rgba(255,255,255,.98) !important;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-logo-wrap {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

.login-logo .brand-logo-wrap {
  width: 64px !important;
  height: 64px !important;
  border-radius: 16px !important;
  padding: 5px;
  border: 1px solid rgba(15,31,51,.08);
  box-shadow: 0 6px 18px rgba(15,31,51,.12);
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-item {
  gap: 12px !important;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
  transition: transform .16s ease, opacity .16s ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-item.active .nav-icon {
  stroke-width: 2;
}

@media (max-width: 820px) {
  .brand-logo-wrap {
    width: 46px !important;
    height: 46px !important;
  }
}


/* =========================================================
   NEW FORTALEZA 2.5.3 — CARREGAMENTO GLOBAL
   ========================================================= */
.global-loading253{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.global-loading253[hidden]{display:none!important}
.global-loading-card253{
  min-width:170px;
  padding:22px 26px;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 18px 55px rgba(11,31,51,.16);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-align:center;
}
.global-loading253 .spinner{
  width:36px;
  height:36px;
  border-width:4px;
}
.global-loading253 strong{
  color:#0b1f33;
  font-size:14px;
  font-weight:700;
}
.global-loading253 small{
  color:#64748b;
  font-size:11px;
}

/* v3.1.0 */
.inline310{display:grid;grid-template-columns:2fr 1fr auto;gap:8px;align-items:end}.warning-box250{padding:12px;border:1px solid currentColor;border-radius:12px;margin-bottom:12px}.nav-icon{min-width:24px;text-align:center}@media(max-width:700px){.inline310{grid-template-columns:1fr}}


/* =========================================================
   NEW FORTALEZA 4.0.0 — ATUALIZAÇÃO GERAL
   ========================================================= */
.nf400-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.nf400-settings-grid,.nf400-box{padding:20px}
.nf400-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.nf400-settings-grid .span2{grid-column:span 2}.nf400-settings-grid .span4{grid-column:1/-1}
.nf400-line{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.nf400-period{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.nf400-period label{display:grid;gap:6px;font-size:12px;font-weight:700}
.nf400-pending{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:12px;margin-bottom:18px}
.nf400-pending-card{border:1px solid var(--line);padding:16px;text-align:left;cursor:pointer}
.nf400-pending-card strong{display:block;font-size:26px}.nf400-pending-card span{font-size:11px;color:var(--muted)}
.nf400-search-first{padding:28px;max-width:780px;margin:auto}
.pdf-host400{position:fixed;left:-10000px;top:0;width:210mm;background:#fff;z-index:-1}
.pdf-page400{width:210mm;min-height:297mm;background:#fff;color:#20303a;padding:14mm 15mm 18mm;font-family:Arial,sans-serif;font-size:11pt;position:relative}
.pdf-logo400{width:48mm;max-height:20mm;object-fit:contain}.pdf-brand400{font-size:21pt;font-weight:800;color:#0a4d78}
.pdf-head400{display:flex;justify-content:space-between;gap:12mm;border-top:3px solid #0a4d78;border-bottom:1px solid #b8cad6;padding:5mm 0;margin-top:3mm;font-size:9pt}
.pdf-head400>div:last-child{text-align:right}.pdf-title400{display:flex;justify-content:space-between;align-items:center;background:#0a4d78;color:#fff;padding:4mm 5mm;margin:7mm 0 5mm}
.pdf-title400 h1{font-size:15pt;margin:0}.pdf-page400 section{border:1px solid #c9d7e0;border-radius:2mm;padding:4mm 5mm;margin:4mm 0}
.pdf-page400 h3{color:#0a4d78;margin:0 0 2mm}.pdf-signature400{text-align:center;margin:16mm auto 8mm;width:75mm;border-top:1px solid #444;padding-top:2mm}.pdf-sign400{max-width:45mm;max-height:18mm;display:block;margin:-15mm auto 1mm}
.pdf-page400 footer{position:absolute;left:0;right:0;bottom:0;background:#0a4d78;color:#fff;padding:4mm 15mm;font-size:8pt}
@media(max-width:1000px){.nf400-pending{grid-template-columns:repeat(2,minmax(0,1fr))}.nf400-settings-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.nf400-settings-grid{grid-template-columns:1fr}.nf400-settings-grid .span2,.nf400-settings-grid .span4{grid-column:1}.nf400-pending{grid-template-columns:1fr 1fr}.nf400-line{grid-template-columns:1fr auto}}


/* NEW FORTALEZA v4.0.1 — LOGO LIMPA NO LOGIN E MENU */
.login-logo-only{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  margin:0 auto 22px !important;
}
.login-company-logo{
  display:block;
  width:132px;
  height:132px;
  max-width:48vw;
  object-fit:contain;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.brand-logo-only{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  padding:12px 8px 18px !important;
  min-height:82px;
}
.sidebar-company-logo{
  display:block;
  width:112px;
  height:70px;
  max-width:100%;
  object-fit:contain;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.login-card .security-note,
.login-card .login-foot{display:none !important;}
@media(max-width:650px){
  .login-company-logo{width:116px;height:116px}
  .sidebar-company-logo{width:104px;height:64px}
}

/* =========================================================
   NEW FORTALEZA 4.1.0 — POLIMENTO VISUAL E FLUXOS
   ========================================================= */

.nf410-dashboard-head,
.nf410-panel .section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.nf410-dashboard-head{margin-bottom:16px}
.nf410-dashboard-head h2,
.nf410-panel h3{margin:0}

.nf410-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}
.nf410-metric{
  position:relative;
  min-height:132px;
  background:#fff;
  border:1px solid #e7edf3;
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 28px rgba(15,31,51,.06);
  overflow:hidden;
}
.nf410-metric::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#176b9f;
}
.nf410-metric.attention::before{background:#c98a16}
.nf410-metric.danger::before{background:#b83333}
.nf410-metric-label{
  color:#5d6b79;
  font-size:12px;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.nf410-metric strong{
  display:block;
  margin-top:10px;
  font-size:34px;
  line-height:1;
  letter-spacing:-.04em;
  color:#10283e;
}
.nf410-metric small{
  display:block;
  margin-top:10px;
  color:#718091;
  font-size:12px;
}
.nf410-today{
  display:flex;
  gap:12px 18px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:18px;
  padding:12px 16px;
  background:#f7fafc;
  border:1px solid #e5ebf0;
  border-radius:14px;
  color:#526272;
  font-size:13px;
}
.nf410-today strong{color:#17334d}
.nf410-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:16px;
  margin-bottom:16px;
}
.nf410-panel{padding:18px}
.nf410-panel .table-wrap{margin-top:10px}

.nf410-timeline{display:grid;gap:2px;margin-top:8px}
.nf410-timeline>div{display:grid;grid-template-columns:14px 1fr;gap:10px;align-items:start;padding:8px 0}
.nf410-timeline>div>span{width:9px;height:9px;border-radius:50%;background:#176b9f;margin-top:6px;box-shadow:0 0 0 4px #e8f2f8}
.nf410-timeline p{margin:0;color:#26394b}
.nf410-timeline small{display:block;color:#7b8996;margin-top:3px}

.nf410-pending-list{display:grid;gap:9px;margin-bottom:20px}
.nf410-pending-row{
  width:100%;
  border:1px solid #e3e9ef;
  background:#fff;
  border-radius:15px;
  padding:14px 16px;
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:12px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  color:#1e3448;
  box-shadow:0 5px 16px rgba(15,31,51,.04);
}
.nf410-pending-row:hover{border-color:#b8cfdf;transform:translateY(-1px)}
.nf410-pending-row strong{font-size:20px;color:#0b5d8a}
.nf410-pending-row b{font-size:22px;color:#8a98a5}

.nf410-info{
  padding:12px 14px;
  border-radius:13px;
  background:#f0f7fb;
  border:1px solid #d8e9f3;
  color:#36566e;
  line-height:1.45;
}
.nf410-service-banner{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  padding:14px 16px;
  margin-bottom:15px;
  border:1px solid #d9e8f1;
  border-radius:16px;
  background:#f5fafc;
  color:#1b425e;
  cursor:pointer;
  text-align:left;
}
.nf410-service-banner strong{font-size:26px}
.nf410-service-banner b{font-size:13px}
.nf410-ready,.nf410-wait{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}
.nf410-ready{background:#e8f6ee;color:#247347}
.nf410-wait{background:#fff3dc;color:#956112}

.nf410-operation-counts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.nf410-op-card{
  min-height:148px;
  border:1px solid #dfe8ef;
  border-radius:20px;
  background:#fff;
  padding:20px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 10px 28px rgba(15,31,51,.06);
}
.nf410-op-card span{display:block;font-weight:800;color:#536576}
.nf410-op-card strong{display:block;font-size:40px;line-height:1;margin:14px 0 8px;color:#0b5d8a}
.nf410-op-card small{color:#7b8996}

.nf410-filter-card{padding:18px;margin-bottom:16px}
.nf410-filter-card select[multiple]{min-height:130px}
.nf410-scroll-table{max-height:66vh;overflow:auto}

/* qualquer tabela/lista longa continua rolável sem estourar a tela */
.table-wrap{
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.data-table{min-width:760px}

@media(max-width:1050px){
  .nf410-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nf410-dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
  .nf410-metrics{grid-template-columns:1fr 1fr;gap:10px}
  .nf410-metric{min-height:112px;padding:15px;border-radius:17px}
  .nf410-metric strong{font-size:30px}
  .nf410-metric small{font-size:11px}
  .nf410-operation-counts{grid-template-columns:1fr 1fr}
  .nf410-op-card{min-height:120px;padding:16px}
  .nf410-op-card strong{font-size:34px}
  .nf410-service-banner{grid-template-columns:auto 1fr}
  .nf410-service-banner b{grid-column:1/-1}
}


/* NEW FORTALEZA v4.1.1 — OS sem técnico */
.data-table tbody tr.nf411-unassigned-row > td{
  background:rgba(220,38,38,.075) !important;
  border-top-color:rgba(220,38,38,.16) !important;
  border-bottom-color:rgba(220,38,38,.16) !important;
}
.data-table tbody tr.nf411-unassigned-row:hover > td{
  background:rgba(220,38,38,.11) !important;
}
.nf411-unassigned-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(220,38,38,.10);
  border:1px solid rgba(220,38,38,.22);
  font-size:12px;
  font-weight:800;
}
.nf411-security-code{
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

/* =========================================================
   NEW FORTALEZA 4.2.0 — AJUSTES VISUAIS CONSOLIDADOS
   ========================================================= */
.nf420-avatar-ring{
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:50%;
  padding:3px;
  border:3px solid #9aa8b5
}
.nf420-loc-green{border-color:#24a765;box-shadow:0 0 0 3px rgba(36,167,101,.12)}
.nf420-loc-orange{border-color:#ee8a21;box-shadow:0 0 0 3px rgba(238,138,33,.12)}
.nf420-loc-red{border-color:#d63845;box-shadow:0 0 0 3px rgba(214,56,69,.12)}
.nf420-loc-unknown{border-color:#9aa8b5}
.nf420-avatar-ring .profile-avatar242{margin:0}
.nf420-map-person{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center
}
.nf420-map-person-info{
  display:grid;
  min-width:0;
  cursor:pointer
}
.nf420-map-person-info strong,.nf420-map-person-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nf420-refresh-person{
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  color:var(--navy)
}
.nf420-refresh-person:disabled{opacity:.55;cursor:wait}
.nf420-release-banner{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  border:0;
  border-radius:16px;
  padding:16px 18px;
  margin-bottom:16px;
  background:#fff2d9;
  color:#5d3b00;
  text-align:left;
  cursor:pointer;
  box-shadow:var(--shadow)
}
.nf420-release-banner strong{
  display:grid;
  place-items:center;
  min-width:38px;
  height:38px;
  border-radius:50%;
  background:#e88014;
  color:#fff;
  font-size:18px
}
.nf420-release-banner b{white-space:nowrap}
.nf420-blocking-backdrop{z-index:10000}
.nf420-release-modal .modal-head{padding-right:22px}
.nf420-release-summary{
  background:#f6f8fb;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px 16px
}
.nf420-release-summary p{margin:7px 0}
.nf420-wait-release{
  padding:12px 14px;
  border-radius:12px;
  background:#fff4de;
  border:1px solid #f1c478;
  color:#674100
}
.nf420-deadline-overdue{color:#b4232d;font-weight:800}
.nf420-deadline-today{color:#b4232d;font-weight:800}
.nf420-deadline-soon{color:#c26408;font-weight:800}
.nf420-deadline-ok{color:#25704a;font-weight:700}
.nf420-unassigned{background:#fff1f2!important}
.nf420-alert-text{color:#b4232d}
.nf420-client-choice{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:12px 14px;
  margin-top:8px;
  display:grid;
  gap:4px;
  text-align:left;
  cursor:pointer
}
.nf420-client-choice span{font-size:12px;color:var(--muted)}
.nf420-tech-parts{
  display:grid;
  gap:8px;
  max-width:720px
}
.nf420-tech-part-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff
}
.nf420-tech-part-row strong{min-width:0;overflow-wrap:anywhere}
.nf420-tech-part-row span{font-weight:800;white-space:nowrap;color:var(--navy)}
.nf420-check-detail{
  padding:10px 12px;
  background:#f7f9fc;
  border-left:3px solid #8da8c3;
  border-radius:8px
}
.nf420-question{
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
  display:grid;
  gap:10px
}
.nf420-question>label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#536273}
.nf420-list-section{
  padding:18px 0;
  border-bottom:1px solid var(--line)
}
.nf420-list-section:last-child{border-bottom:0}
.nf420-inactive{opacity:.58}

@media(max-width:620px){
  .nf420-release-banner{grid-template-columns:auto 1fr}
  .nf420-release-banner b{grid-column:1/-1;margin-left:50px}
  .nf420-map-person{grid-template-columns:auto minmax(0,1fr) auto}
  .nf420-tech-part-row{grid-template-columns:minmax(0,1fr) auto;padding:12px}
  .nf420-tech-part-row span{font-size:13px}
  .nf420-release-modal .modal-actions{display:grid;grid-template-columns:1fr 1fr}
}


/* =========================================================
   NEW FORTALEZA 4.2.1 — PDF PROFISSIONAL / HOMOLOGAÇÃO
   ========================================================= */
.pdf421-host{position:fixed;left:-10000px;top:0;width:196mm;background:#fff;z-index:-1}
.pdf421-document{width:196mm;box-sizing:border-box;background:#fff;color:#182433;font-family:Arial,Helvetica,sans-serif;font-size:10.5pt;line-height:1.35}
.pdf421-header{display:grid;grid-template-columns:46mm 1fr;align-items:center;gap:7mm;border-bottom:1.2px solid #0f5b7d;padding:0 0 4mm;margin-bottom:5mm}
.pdf421-logo-wrap{height:24mm;display:flex;align-items:center;justify-content:flex-start}
.pdf421-logo{display:block;max-width:42mm;max-height:22mm;width:auto!important;height:auto!important;object-fit:contain}
.pdf421-brand{font-weight:800;color:#0f5b7d;font-size:18pt}
.pdf421-company{display:flex;flex-direction:column;text-align:right;gap:.5mm}
.pdf421-company strong{font-size:11pt}
.pdf421-company span,.pdf421-company small{font-size:8.5pt;color:#46586a}
.pdf421-title{display:flex;justify-content:space-between;align-items:center;background:#0f5b7d;color:#fff;padding:3.5mm 5mm;margin-bottom:4mm;break-inside:avoid}
.pdf421-title h1{font-size:16pt;margin:0;line-height:1.1;color:#fff}
.pdf421-title small{display:block;margin-top:1mm;font-size:7.5pt;color:#e9f5fb}
.pdf421-title>strong{font-size:10pt}
.pdf421-section{border:1px solid #d7e2e8;border-radius:2.5mm;padding:4mm 5mm;margin:0 0 4mm;break-inside:avoid;background:#fff}
.pdf421-section h3{margin:0 0 3mm;color:#0f5b7d;font-size:11pt}
.pdf421-section p{margin:1.5mm 0;white-space:pre-wrap}
.pdf421-grid{display:grid;grid-template-columns:1fr 1fr;gap:2.2mm 5mm}
.pdf421-info{min-width:0;display:flex;flex-direction:column;border-bottom:.3mm solid #edf2f5;padding-bottom:1.4mm}
.pdf421-info.wide{grid-column:1/-1}
.pdf421-info span{font-size:7.5pt;text-transform:uppercase;letter-spacing:.2px;color:#6b7885}
.pdf421-info strong{font-size:9.5pt;overflow-wrap:anywhere}
.pdf421-photo-section{break-inside:auto}
.pdf421-photos{display:grid;grid-template-columns:1fr 1fr;gap:4mm}
.pdf421-photos figure{margin:0;break-inside:avoid}
.pdf421-photo-box{height:57mm;border:1px solid #d5e0e6;border-radius:2mm;background:#f7fafb;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pdf421-photo-box img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}
.pdf421-photos figcaption{font-size:8pt;text-align:center;margin-top:1.2mm;font-weight:700;color:#405466}
.pdf421-note{border-left:1.2mm solid #0f5b7d;padding:2mm 4mm;margin:4mm 0;break-inside:avoid}
.pdf421-note p{margin:1mm 0}
.pdf421-warning{border-left:1.5mm solid #bb5a22;background:#fffaf6}
.pdf421-table{width:100%;border-collapse:collapse;font-size:9pt}
.pdf421-table th,.pdf421-table td{border-bottom:1px solid #dce5ea;padding:2mm;text-align:left}
.pdf421-table th{background:#f2f7f9;color:#0f5b7d}
.pdf421-footer{margin-top:6mm;border-top:1px solid #d6e1e7;padding-top:2.5mm;display:flex;justify-content:space-between;font-size:7.5pt;color:#607080}
.pdf421-photo-input small{display:block;margin-top:4px;color:#667787}
@media print{
  .pdf421-document{width:100%}
  .pdf421-section,.pdf421-title,.pdf421-header,figure{break-inside:avoid}
}


/* =========================================================
   NEW FORTALEZA 4.2.2 — PDF / FLUXOS DE HOMOLOGAÇÃO
   ========================================================= */
.pdf422-render-host{
  position:absolute !important;left:-12000px !important;top:0 !important;
  margin:0 !important;padding:0 !important;width:196mm !important;
  min-width:196mm !important;max-width:196mm !important;background:#fff !important;
  box-sizing:border-box !important;overflow:visible !important;pointer-events:none !important;
  z-index:-2147483647 !important;
}
.pdf422-render-host .pdf421-document{
  position:relative !important;display:block !important;width:196mm !important;
  min-width:196mm !important;max-width:196mm !important;margin:0 !important;padding:0 !important;
  transform:none !important;inset:auto !important;box-sizing:border-box !important;background:#fff !important;
}
.pdf422-render-host .pdf421-header{position:relative !important;top:auto !important;margin-top:0 !important;padding-top:0 !important}
.pdf422-render-host .pdf421-header,.pdf422-render-host .pdf421-title,.pdf422-render-host .pdf421-section,
.pdf422-render-host .pdf421-info,.pdf422-render-host .pdf421-photos figure,.pdf422-render-host .pdf421-footer{
  break-inside:avoid !important;page-break-inside:avoid !important;
}
.pdf422-render-host .pdf421-company{padding-right:1.5mm;max-width:100%;overflow-wrap:anywhere}
.pdf422-render-host .pdf421-logo{width:auto !important;height:auto !important;max-width:40mm !important;max-height:21mm !important;object-fit:contain !important}
.pdf422-render-host .pdf421-photo-box img{width:100% !important;height:100% !important;object-fit:contain !important;object-position:center !important}
.pdf422-page-break{display:block;page-break-before:always;break-before:page;height:0;margin:0;padding:0}
.nf422-test-confirm{padding:14px;border:1px solid var(--border,#d9e2e8);border-radius:12px;background:#f7fafc}
.nf422-test-confirm input{margin-right:8px}


/* =========================================================
   NEW FORTALEZA v4.2.3 — DESTAQUES OPERACIONAIS
   ========================================================= */
.nf423-tech{
  display:flex;flex-direction:column;gap:2px;margin:10px 0;padding:11px 13px;
  border:1px solid #b9c9d4;border-radius:12px;background:#f5f9fc
}
.nf423-tech span{font-size:.72rem;font-weight:800;letter-spacing:.08em;color:#536875}
.nf423-tech strong{font-size:1.02rem;color:#102a3a}
.nf423-alert{
  display:flex;flex-direction:column;gap:3px;margin:10px 0;padding:12px 13px;
  border-radius:12px;border:2px solid transparent
}
.nf423-alert strong{font-size:.9rem;letter-spacing:.02em}
.nf423-alert span{font-size:.82rem}
.nf423-alert-loan{background:#fff4d6;border-color:#e7aa22;color:#704900}
.nf423-alert-danger{background:#ffe7e7;border-color:#d43c3c;color:#7d1717}
.nf423-alert-ok{background:#e9f7ef;border-color:#58a778;color:#205f3a}
.nf423-alert-warn{background:#fff0df;border-color:#d88429;color:#713f0a}
.nf423-store{margin:10px 0;padding:12px;border-radius:12px;background:#e9f2ff;border:1px solid #7da9df;display:flex;flex-direction:column;gap:3px}
.nf423-store strong{color:#164d86}
.nf423-note{padding:10px 12px;border-left:4px solid #4d7a96;background:#f7fafc;border-radius:8px}
.nf423-confirm-danger{padding:14px;border:2px solid #c94a4a;background:#fff0f0;border-radius:12px}
.nf423-confirm-danger strong{color:#941f1f}
.nf423-confirm-loan{padding:13px;border:2px solid #e0a52b;background:#fff5d9;border-radius:12px;font-weight:700}
.nf423-warranty{display:flex;flex-direction:column;gap:3px;margin:9px 0;padding:10px 12px;border-radius:10px}
.nf423-warranty.active{background:#eaf8ef;border:1px solid #63ad7d;color:#245f38}
.nf423-warranty.expired{background:#f4f4f4;border:1px solid #c8c8c8;color:#666}
.nf423-return-active{padding:9px 11px;background:#edf4ff;border-radius:9px}
@media(max-width:650px){
  .nf423-tech,.nf423-alert{margin:8px 0}
}


/* NEW FORTALEZA v4.2.4 — decisão de empréstimo */
.nf424-removal-check{
  display:flex;align-items:center;gap:10px;padding:12px 13px;
  border:1px solid #cbd7df;border-radius:12px;background:#f7fafc;
  font-weight:700;cursor:pointer
}
.nf424-removal-check input{width:20px;height:20px;flex:0 0 auto}
.nf424-removal-fields{
  margin-top:12px;padding:13px;border:1px solid #d7e1e7;
  border-radius:12px;background:#fff
}
.nf424-loan-title{
  font-weight:800;margin-bottom:10px;color:#173547
}
.nf424-loan-option{
  display:flex;align-items:center;gap:11px;padding:12px;
  margin:8px 0;border:2px solid #d5e0e6;border-radius:12px;
  background:#f9fbfc;cursor:pointer
}
.nf424-loan-option:has(input:checked){
  border-color:#3e7998;background:#eef7fb
}
.nf424-loan-option input{width:21px;height:21px;flex:0 0 auto}
.nf424-loan-option span{display:flex;flex-direction:column;gap:2px}
.nf424-loan-option strong{font-size:.95rem}
.nf424-loan-option small{font-size:.78rem;color:#5d707a}


/* NEW FORTALEZA v4.2.5 — confirmação dos testes */
.nf425-tests-box{
  padding:14px;
  border:2px solid #8aa9bb;
  border-radius:13px;
  background:#f6fafc;
}
.nf425-tests-box>strong{
  display:block;
  margin-bottom:4px;
  color:#173c50;
  letter-spacing:.04em;
}
.nf425-tests-box>p{
  margin:4px 0 12px;
  color:#5b6d77;
}
.nf425-tests-confirm{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:13px;
  border:2px solid #c6d5dd;
  border-radius:11px;
  background:#fff;
  cursor:pointer;
  font-weight:700;
}
.nf425-tests-confirm input{
  width:22px;
  height:22px;
  flex:0 0 auto;
  margin-top:1px;
}
.nf425-tests-confirm:has(input:checked){
  border-color:#4f9a6c;
  background:#edf8f1;
}
.nf425-tests-error{
  border-color:#cf4545!important;
  background:#fff1f1!important;
}


/* =========================================================
   NEW FORTALEZA v4.2.6 — CORREÇÕES VISUAIS FINAIS
   ========================================================= */

.nf426-tests-box{
  padding:15px;
  border:2px solid #7fa3b8;
  border-radius:14px;
  background:#f5fafd;
}
.nf426-tests-box>strong{
  display:block;
  color:#173d52;
  font-size:.92rem;
  letter-spacing:.04em;
}
.nf426-tests-box>p{
  margin:6px 0 12px;
  color:#536975;
}
.nf426-tests-confirm{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border:2px solid #c2d3dc;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  font-weight:750;
}
.nf426-tests-confirm input{
  width:23px;
  height:23px;
  flex:0 0 auto;
  margin-top:1px;
}
.nf426-tests-confirm:has(input:checked){
  border-color:#4e9b6b;
  background:#ecf8f0;
}
.nf426-tests-error{
  border-color:#cb3e3e!important;
  background:#fff0f0!important;
}
.nf426-inline-error{
  margin:10px 0 0!important;
  color:#a91f1f!important;
  font-weight:700;
}
.nf426-auth-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.nf426-auth-actions .btn-primary{
  flex:1 1 190px;
  font-weight:800;
}
.nf426-auth-actions .btn-danger{
  flex:1 1 150px;
}
.nf426-removal-card .nf423-tech,
.nf426-removal-card .nf423-alert{
  margin-top:10px;
}
@media(max-width:650px){
  .nf426-auth-actions{
    flex-direction:column;
  }
  .nf426-auth-actions .btn{
    width:100%;
  }
}


/* =========================================================
   NEW FORTALEZA v4.3.0 — BARREIRA VISUAL DE AUTENTICAÇÃO
   Estas regras ficam por último de propósito.
   ========================================================= */

#appShell[hidden],
body.nf-unauthenticated #appShell,
body.nf-auth-pending #appShell{
  display:none !important;
  visibility:hidden !important;
}

#loginScreen[hidden],
body.nf-authenticated #loginScreen,
body.nf-auth-pending #loginScreen{
  display:none !important;
  visibility:hidden !important;
}

body.nf-authenticated #appShell:not([hidden]){
  visibility:visible !important;
}

body.nf-unauthenticated #loginScreen:not([hidden]){
  display:grid !important;
  visibility:visible !important;
}

body.nf-auth-pending{
  overflow:hidden;
}

body.nf-auth-pending::before{
  content:"Validando acesso…";
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:grid;
  place-items:center;
  background:#071522;
  color:#fff;
  font:700 16px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}


/* =========================================================
   TÉCNICO — ENDEREÇO E BLOQUEIO DOS PRÓXIMOS ATENDIMENTOS
   ========================================================= */

.nf430-address-extra{
  margin-top:4px;
  margin-bottom:4px;
}

/*
  Quando existe um atendimento atual, os demais continuam
  visíveis, mas ficam bloqueados até a OS atual ser liberada
  ou finalizada.
*/
.tech-service-locked{
  position:relative;
  opacity:.48;
  filter:grayscale(.22);
  pointer-events:none;
  user-select:none;
}

.tech-service-locked::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:rgba(255,255,255,.08);
  pointer-events:none;
}

.tech-lock-badge{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin:0 0 12px 0;
  padding:7px 10px;
  border-radius:10px;
  background:#eef2f7;
  border:1px solid #dbe3ec;
  color:#526174;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}

@media(max-width:820px){
  .tech-service-locked{
    opacity:.52;
  }
}
