:root{
  --ink:#1B2432;
  --slate:#2E3A50;
  --slate-2:#3A4863;
  --paper:#F5F6F8;
  --card:#FFFFFF;
  --line:#E6E8EC;
  --muted:#7A8496;
  --accent:#3D6BFF;
  --accent-soft:#EAF0FF;
  --good:#12A583;
  --good-soft:#E3F7F1;
  --warn:#C98A1B;
  --warn-soft:#FBF0DD;
  --danger:#D64545;
  --danger-soft:#FBE7E7;
  --purple:#8A5CF6;
  --purple-soft:#F1EBFE;
}
*{box-sizing:border-box;}
body{
  font-family:'Inter', sans-serif;
  background:var(--paper);
  color:var(--ink);
}
h1,h2,h3,h4,.brand,.nav-section-title{
  font-family:'Plus Jakarta Sans', sans-serif;
}
#techmap {
  width: auto;
  height: 100%;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.sidebar{
  width:260px;
  min-height:100vh;
  background:var(--slate);
  color:#D7DCE6;
  position:fixed;
  left:0; top:0; bottom:0;
  padding:22px 16px;
  display:flex;
  flex-direction:column;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  font-weight:800;
  font-size:1.05rem;
  padding:4px 8px 22px 8px;
}
.brand-mark{
  width:34px;height:34px;
  border-radius:9px;
  background:linear-gradient(135deg, var(--accent), #7FA0FF);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
  font-size:.95rem;
  color:#fff;
  flex-shrink:0;
}
.nav-section-title{
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#8892A6;
  font-weight:700;
  margin:18px 10px 8px;
}
.nav-link-custom{
  display:flex;
  align-items:center;
  gap:11px;
  padding:9px 12px;
  border-radius:9px;
  color:#C7CDDB;
  font-size:.89rem;
  font-weight:500;
  text-decoration:none;
  margin-bottom:2px;
  transition:background .12s ease, color .12s ease;
}
.nav-link-custom i{font-size:1.02rem; width:20px; text-align:center;}
.nav-link-custom:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}
.nav-link-custom.active{
  background:var(--accent);
  color:#fff;
  font-weight:600;
}
.nav-link-soon{
  display:flex;
  align-items:center;
  gap:11px;
  padding:9px 12px;
  border-radius:9px;
  color:#5C6786;
  font-size:.89rem;
  font-weight:500;
  cursor:default;
  margin-bottom:2px;
}
.nav-link-soon i{font-size:1.02rem; width:20px; text-align:center;}
.soon-badge{
  margin-left:auto;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  background:rgba(255,255,255,.07);
  color:#8892A6;
  padding:2px 7px;
  border-radius:20px;
}
.sidebar-footer{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}
.user-chip{
  display:flex;align-items:center;gap:10px;
  padding:8px;
  border-radius:10px;
}
.user-chip:hover{background:rgba(255,255,255,.06);}
.avatar-sm{
  width:34px;height:34px;border-radius:50%;
  background:#4A5A7A;
  display:flex;align-items:center;justify-content:center;
  font-size:.78rem;font-weight:700;color:#fff;
  flex-shrink:0;
}
.main{
  margin-left:260px;
  padding:26px 34px 60px;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:26px;
}
.page-eyebrow{
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:2px;
}
.page-title{
  font-weight:800;
  font-size:1.5rem;
  margin:0;
}
.topbar-search{
  max-width:280px;
}
.topbar-search .form-control{
  background:#fff;
  border:1px solid var(--line);
  font-size:.85rem;
}
.stat-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px 20px;
}
.stat-label{
  font-size:.78rem;
  color:var(--muted);
  font-weight:600;
  margin-bottom:6px;
}
.stat-value{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:1.6rem;
}
.stat-icon{
  width:40px;height:40px;
  border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:1.1rem;
}
.stat-trend{
  font-size:.76rem;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:3px;
  margin-top:8px;
}
.trend-up{color:var(--good);}
.trend-down{color:var(--danger);}
.trend-flat{color:var(--muted);}
.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
}
.panel-head{
  padding:18px 22px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.panel-head h5{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:700;
  margin:0;
  font-size:1.02rem;
}
.panel-head .subtitle{
  font-size:.8rem;
  color:var(--muted);
  margin-top:2px;
}
.panel-body{padding:20px 22px;}
.panel-link{
  font-size:.8rem;
  font-weight:600;
  color:var(--accent);
  text-decoration:none;
}
.seg-btn{
  font-size:.78rem;
  padding:5px 12px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-weight:600;
}
.seg-btn.active{
  background:var(--accent-soft);
  color:var(--accent);
  border-color:var(--accent-soft);
}
.table-tools{
  display:flex;
  gap:10px;
  align-items:center;
}
.table-tools .form-control, .table-tools .form-select{
  font-size:.85rem;
}
table.custom-table{margin:0;}
table.custom-table thead th{
  background:#FAFBFC;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  font-weight:700;
  border-bottom:1px solid var(--line);
  padding:12px 22px;
  white-space:nowrap;
}
table.custom-table tbody td{
  padding:13px 22px;
  vertical-align:middle;
  border-bottom:1px solid var(--line);
  font-size:.87rem;
}
table.custom-table tbody tr:last-child td{border-bottom:none;}
table.custom-table tbody tr:hover{background:#FBFCFE;}
.avatar-tab{
  width:34px;height:34px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:.74rem;font-weight:700;color:#fff;
  flex-shrink:0;
}
.user-cell{display:flex;align-items:center;gap:11px;}
.user-name{font-weight:600;}
.user-email{font-size:.78rem;color:var(--muted);}

.badge-role{
  font-size:.72rem;
  font-weight:600;
  padding:4px 10px;
  border-radius:20px;
}
.role-admin{background:var(--accent-soft); color:var(--accent);}
.role-tech{background:#EEF0F4; color:#5C6786;}
.status-dot{
  width:7px;height:7px;border-radius:50%;
  display:inline-block;
  margin-right:6px;
}
.status-active{color:var(--good); font-weight:600; font-size:.82rem;}
.status-active .status-dot{background:var(--good);}
.status-inactive{color:var(--muted); font-weight:600; font-size:.82rem;}
.status-inactive .status-dot{background:#B7BEC9;}
.row-actions .btn{
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--slate-2);
  padding:5px 9px;
  border-radius:8px;
}
.row-actions .btn:hover{
  color:var(--accent);
  background:var(--accent-soft);
  border-color:var(--accent-soft);
}
.panel-foot{
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-top:1px solid var(--line);
  font-size:.82rem;
  color:var(--muted);
}
.pagination .page-link{
  border:none;
  color:var(--ink);
  font-size:.82rem;
  border-radius:8px !important;
  margin:0 2px;
}
.pagination .page-item.active .page-link{
  background:var(--accent);
  color:#fff;
}
.btn-accent{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
  font-weight:600;
  font-size:.86rem;
}
.btn-accent:hover{
  background:#2E58E0;
  border-color:#2E58E0;
  color:#fff;
}
.btn-outline-soft{
  border:1px solid var(--line);
  color:var(--slate-2);
  background:var(--paper);
  font-weight:500;
  font-size:.85rem;
}
.btn-outline-soft:hover{background:#EAEDF2; color:var(--ink);}
.modal-content{border-radius:16px; border:none;}
.modal-header{border-bottom:1px solid var(--line); padding:18px 22px;}
.modal-body{padding:20px 22px;}
.modal-footer{border-top:1px solid var(--line); padding:16px 22px;}
.form-label{font-size:.83rem; font-weight:600; color:var(--slate-2);}
.form-control, .form-select{
  font-size:.88rem;
  height:44px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.form-control:focus, .form-select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.form-control:disabled{
  background:#F5F6F8;
  color:var(--muted);
  cursor:not-allowed;
}
.login-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.login-card{
  width:100%;
  max-width:360px;
  padding:36px 32px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 1px 3px rgba(27,36,50,.04);
  text-align:center;
}
.login-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:1rem;
  color:var(--ink);
  margin-bottom:26px;
}
.login-brand-mark{
  width:32px;height:32px;
  border-radius:8px;
  background:var(--accent);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
  font-size:.85rem;
  color:#fff;
  flex-shrink:0;
}
.login-title{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:1.35rem;
  margin-bottom:6px;
}
.login-sub{
  color:var(--muted);
  font-size:.87rem;
  margin-bottom:26px;
}
.login-card form{
  text-align:left;
}
.btn-login{
  height:44px;
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
  font-weight:700;
  font-size:.88rem;
  border-radius:9px;
}
.btn-login:hover{
  background:#2E58E0;
  border-color:#2E58E0;
  color:#fff;
}
.link-forgot{
  font-size:.82rem;
  font-weight:600;
  color:var(--accent);
  text-decoration:none;
}
.link-forgot:hover{text-decoration:underline;}
.login-error{
  display:flex;
  align-items:flex-start;
  gap:9px;
  background:var(--danger-soft);
  color:var(--danger);
  border-radius:9px;
  padding:11px 13px;
  font-size:.83rem;
  font-weight:500;
  margin-bottom:18px;
  animation:shake .35s ease;
}
.login-error i{font-size:.95rem; margin-top:1px; flex-shrink:0;}
.os-id{font-weight:700; color:var(--slate-2); font-family:'Plus Jakarta Sans';}
.os-client{font-weight:600;}
.os-desc{font-size:.78rem; color:var(--muted);}
.badge-status{
  font-size:.72rem;
  font-weight:600;
  padding:4px 10px;
  border-radius:20px;
  white-space:nowrap;
}
.status-aberta{background:var(--accent-soft); color:var(--accent);}
.status-andamento{background:var(--warn-soft); color:var(--warn);}
.status-concluida{background:var(--good-soft); color:var(--good);}
.status-atrasada{background:var(--danger-soft); color:var(--danger);}
.badge-prioridade{
  font-size:.7rem;
  font-weight:700;
  padding:3px 9px;
  border-radius:20px;
}
.prio-alta{background:var(--danger-soft); color:var(--danger);}
.prio-media{background:var(--warn-soft); color:var(--warn);}
.prio-baixa{background:#EEF0F4; color:#5C6786;}
.tech-cell{display:flex; align-items:center; gap:9px;}
.tech-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--line);
}
.tech-row:last-child{border-bottom:none; padding-bottom:0;}
.tech-avatar{
  width:38px;height:38px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:.8rem;font-weight:700;color:#fff;
  flex-shrink:0;
}
.tech-name{font-weight:600; font-size:.87rem;}
.tech-meta{font-size:.74rem; color:var(--muted);}
.tech-score{
  margin-left:auto;
  text-align:right;
  font-family:'Plus Jakarta Sans';
  font-weight:800;
  font-size:.95rem;
}
.tech-score small{
  display:block;
  font-family:'Inter';
  font-weight:500;
  font-size:.68rem;
  color:var(--muted);
}
.urgent-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--line);
}
.urgent-item:last-child{border-bottom:none; padding-bottom:0;}
.urgent-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--danger);
  flex-shrink:0;
}
.urgent-text{font-size:.85rem; font-weight:600;}
.urgent-meta{font-size:.74rem; color:var(--muted);}
.live-indicator{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:.78rem;
  font-weight:700;
  color:var(--good);
  background:var(--good-soft);
  padding:5px 12px;
  border-radius:20px;
}
.live-dot{
  width:7px; height:7px;
  border-radius:50%;
  background:var(--good);
  display:inline-block;
  animation:pulse 1.6s infinite;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(18,165,131,.45); }
  70%{ box-shadow:0 0 0 7px rgba(18,165,131,0); }
  100%{ box-shadow:0 0 0 0 rgba(18,165,131,0); }
}
.live-feed-wrap{
  max-height:330px;
  overflow-y:auto;
}
.live-feed-item{
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:13px 22px;
  border-bottom:1px solid var(--line);
}
.live-feed-item:last-child{border-bottom:none;}
.live-feed-item.feed-enter{
  animation:feedIn .45s ease;
}
@keyframes feedIn{
  from{ opacity:0; transform:translateY(-6px); background:var(--accent-soft); }
  to{ opacity:1; transform:translateY(0); background:transparent; }
}
.live-feed-icon{
  width:34px; height:34px;
  border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem;
  flex-shrink:0;
}
.live-feed-text{font-size:.86rem;}
.live-feed-text b{font-weight:600;}
.live-feed-time{
  font-size:.74rem;
  color:var(--muted);
  white-space:nowrap;
  margin-left:auto;
  padding-left:12px;
}
.map-panel-body{
  display:flex;
  border-radius:0 0 16px 16px;
  overflow:hidden;
}
.map-canvas{
  position:relative;
  flex:1;
  height:420px;
  overflow:hidden;
}
.map-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.map-pin{
  position:absolute;
  transform:translate(-50%, -50%);
}
.map-pin-dot{
  width:34px; height:34px;
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 3px 8px rgba(27,36,50,.18);
  border:2px solid #fff;
}
.map-pin-dot .pin-label{
  display:block;
  transform:rotate(45deg);
  font-size:.66rem;
  font-weight:700;
  color:#fff;
}
.pin-andamento{background:var(--warn);}
.pin-deslocamento{background:var(--accent);}
.pin-disponivel{background:var(--good);}
.map-legend{
  position:absolute;
  left:16px; bottom:16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 14px;
  display:flex;
  gap:16px;
  font-size:.76rem;
  color:var(--slate-2);
  font-weight:600;
  box-shadow:0 2px 6px rgba(27,36,50,.06);
}
.map-legend .dot{
  width:8px; height:8px;
  border-radius:50%;
  display:inline-block;
  margin-right:5px;
}
.dot-andamento{background:var(--warn);}
.dot-deslocamento{background:var(--accent);}
.dot-disponivel{background:var(--good);}
.map-sidebar{
  width:250px;
  height:420px;
  overflow-y:auto;
  border-left:1px solid var(--line);
  padding:14px;
  flex-shrink:0;
}
.map-tech-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 8px;
  border-radius:10px;
}
.map-tech-row:hover{background:#FBFCFE;}
@media (max-width: 991px){
  .map-panel-body{flex-direction:column;}
  .map-sidebar{width:100%; max-height:280px; border-left:none; border-top:1px solid var(--line);}
}
.dropdown-menu{
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 8px 24px rgba(27,36,50,.10);
  padding:6px;
  min-width:210px;
}
.dropdown-item{
  font-size:.86rem;
  border-radius:8px;
  padding:8px 10px;
  color:var(--ink);
}
.dropdown-item:hover, .dropdown-item:focus{
  background:var(--paper);
}
.dropdown-item i{color:var(--muted); font-size:.9rem;}
.dropdown-item-danger{color:var(--danger);}
.dropdown-item-danger i{color:var(--danger);}
.dropdown-item-danger:hover{background:var(--danger-soft); color:var(--danger);}
.dropdown-divider{margin:6px 4px;}
.qr-frame{
  width:416px;
  height:416px;
  margin:0 auto 16px;
  padding:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.qr-frame img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.qr-hint{
  font-size:.82rem;
  color:var(--muted);
  margin-bottom:10px;
}
.qr-expiry{
  display:inline-flex;
  align-items:center;
  font-size:.78rem;
  font-weight:600;
  color:var(--warn);
  background:var(--warn-soft);
  padding:5px 12px;
  border-radius:20px;
}

.footnote{
  font-size:.78rem;
  color:var(--muted);
  text-align:center;
  margin-top:26px;
}
.error-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.error-card{
  width:100%;
  max-width:450px;
  text-align:center;
}
.error-icon-wrap{
  width:84px; height:84px;
  border-radius:22px;
  background:var(--danger-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 26px;
}
.error-icon-wrap i{
  font-size:2rem;
  color:var(--danger);
}
.error-code{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:.78rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--danger);
  margin-bottom:10px;
}
.error-title{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:1.5rem;
  margin-bottom:10px;
}
.error-sub{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.6;
  margin-bottom:30px;
}
.error-actions{
  display:flex;
  gap:10px;
  justify-content:center;
}
.error-ref{
  margin-top:26px;
  font-size:.76rem;
  color:var(--muted);
}
.error-ref code{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:6px;
  padding:2px 7px;
  color:var(--slate-2);
  font-size:.74rem;
}