@keyframes win-window-open {
  from { opacity: 0; transform: translateY(7px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes win-screen-enter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes win-working {
  0%, 100% { opacity: .58; }
  50% { opacity: 1; }
}

.screen.active:not(.home-screen) {
  animation: win-screen-enter .18s ease-out;
}

.modal-title,
.screen-title,
.panel-head {
  background: linear-gradient(#fbfcfd 0%, #e8edf0 47%, #d8e0e5 100%) !important;
  box-shadow: inset 0 1px 0 #fff;
}

.toolbar button,
.modal-actions button,
.filter-panel button,
.coupling-actions button,
.file-picker button {
  border-color: #9caab4 !important;
  border-radius: 2px !important;
  background: linear-gradient(#fff 0%, #f4f6f7 48%, #dfe5e8 100%) !important;
  box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(33,48,58,.08) !important;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .08s ease !important;
}

.toolbar button:hover,
.modal-actions button:hover,
.filter-panel button:hover,
.coupling-actions button:hover:not(:disabled),
.file-picker button:hover {
  border-color: #6e96b1 !important;
  background: linear-gradient(#fff 0%, #eaf5fb 48%, #d6e9f4 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 2px 4px rgba(44,82,106,.18) !important;
}

.toolbar button:active,
.modal-actions button:active,
.filter-panel button:active,
.coupling-actions button:active:not(:disabled),
.file-picker button:active {
  transform: translateY(1px);
  background: linear-gradient(#d4e4ee, #edf5fa) !important;
  box-shadow: inset 0 2px 3px rgba(29,60,78,.22) !important;
}

.toolbar button.danger,
.coupling-actions button.danger {
  color: #8f302b !important;
}

input,
select,
textarea,
.win-select-button {
  border-radius: 1px !important;
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

input:hover,
select:hover,
textarea:hover,
.win-select-button:hover {
  border-color: #8299a8 !important;
}

input:focus,
select:focus,
textarea:focus,
.win-select.open .win-select-button {
  outline: 0 !important;
  border-color: #3f7fa9 !important;
  box-shadow: 0 0 0 1px rgba(91,154,196,.22), inset 0 1px 2px rgba(36,67,86,.08) !important;
  background-color: #fff !important;
}

.data-table tbody tr {
  transition: background-color .12s ease, box-shadow .12s ease;
}

.data-table tbody tr:hover {
  box-shadow: inset 3px 0 0 #72a85e;
}

.data-table tbody tr.selected {
  box-shadow: inset 3px 0 0 #3979a4, inset 0 1px 0 rgba(255,255,255,.65);
}

.coupling-panel,
.crlv-panel {
  animation: win-screen-enter .16s ease-out;
  box-shadow: inset 0 1px 0 #fff;
}

.crlv-analysis:not(:empty) {
  transition: color .15s ease;
}

.crlv-analysis.analyzing {
  color: #315f7f;
  animation: win-working .8s ease-in-out infinite;
}

.native-select-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.modal-win-select {
  position: relative;
  width: 100%;
  margin-top: 2px;
}

.modal-win-select .win-select-options {
  display: block;
  max-height: 220px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px) scaleY(.92);
  transform-origin: top;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.modal-win-select.open .win-select-options {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
  transition-delay: 0s;
  animation: none;
}

.modal-win-select .win-select-button i {
  transition: background .14s ease;
}

.modal-win-select.open .win-select-button i {
  background: linear-gradient(#d8e8f2, #f3f8fb);
  box-shadow: inset 0 1px 2px rgba(38,75,98,.2);
}

.vehicle-search-field {
  position: relative;
}

.vehicle-suggestions {
  position: absolute;
  z-index: 120;
  top: 45px;
  left: 0;
  display: block;
  visibility: hidden;
  width: 100%;
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid #7f898f;
  background: #fff;
  box-shadow: 2px 4px 8px rgba(29,42,51,.28);
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}

.vehicle-suggestions.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.vehicle-suggestions button {
  display: grid;
  grid-template-columns: 90px 1fr;
  width: 100%;
  min-height: 27px;
  padding: 4px 7px;
  border: 0;
  border-bottom: 1px solid #c7c9cb;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.vehicle-suggestions button:hover {
  background: #dcecff;
  box-shadow: inset 0 0 0 1px #7da2ce;
}

.vehicle-suggestions button b {
  color: #285674;
}

.vehicle-suggestions button span {
  overflow: hidden;
  color: #596a74;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-empty {
  padding: 8px;
  color: #77838b;
}

.file-picker:focus-within {
  border-color: #3f7fa9;
  box-shadow: 0 0 0 1px rgba(91,154,196,.2), inset 0 1px 2px rgba(36,67,86,.08);
}

.badge {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

@media (prefers-reduced-motion: reduce) {
}

.asset-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #aeb8bf;
  background: #c7d0d6;
}

.asset-details > div {
  min-height: 49px;
  padding: 7px 9px;
  background: #f7f9fa;
}

.asset-details span,
.asset-details b {
  display: block;
}

.asset-details span {
  margin-bottom: 4px;
  color: #667680;
  font-size: 11px;
}

.asset-details b {
  color: #223b4b;
  font-weight: 600;
}

.document-open {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #86a6bb;
  background: linear-gradient(#fff, #e2edf4);
  color: #245a7b;
  text-decoration: none;
  cursor: pointer;
}

.document-open:hover {
  border-color: #4f819f;
  background: #d8eaf5;
  text-decoration: underline;
}

.coupling-panel {
  margin-top: 10px;
  border: 1px solid #aab5bd;
  background: #f7f9fa;
}

.crlv-source-links {
  display: none;
}

.crlv-panel {
  margin-top: 10px;
  border: 1px solid #aab5bd;
  background: #f7f9fa;
}

.crlv-panel h3 {
  margin: 0;
  padding: 6px 9px;
  border-bottom: 1px solid #99a1a6;
  background: linear-gradient(#f8fafb, #dce3e7);
  color: #294f69;
  font-size: 12px;
}

.crlv-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.crlv-panel .document-open small {
  display: block;
  max-width: 180px;
  margin-top: 2px;
  overflow: hidden;
  color: #687984;
  font-size: 10px;
  font-weight: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupling-panel h3 {
  margin: 0;
  padding: 6px 9px;
  border-bottom: 1px solid #99a1a6;
  background: linear-gradient(#f8fafb, #dce3e7);
  color: #294f69;
  font-size: 12px;
}

.coupling-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 9px 5px;
}

.coupling-current span {
  color: #687883;
}

.coupling-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
  padding: 5px 9px 9px;
}

.coupling-actions select {
  width: 100%;
  min-width: 0;
  height: 27px;
  border: 1px solid #9daab3;
  background: #fff;
}

.coupling-plate-field {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.coupling-plate-field span {
  display: none;
}

.coupling-plate-field input,
.coupling-plate-field select {
  width: 100%;
  height: 27px;
  margin: 0;
  border: 1px solid #9daab3;
  background: #fff;
}

.coupling-actions button {
  width: 100%;
  height: 27px;
  padding: 0 10px;
  border: 1px solid #9daab3;
  background: linear-gradient(#fff, #dfe5e9);
  cursor: pointer;
  white-space: nowrap;
}

.coupling-actions button:disabled {
  color: #999;
  cursor: default;
  opacity: .65;
}

.modal-title {
  color: #263f51;
  background: linear-gradient(#f6f8f9, #d4dade) !important;
}

.credential-rules {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
  padding: 8px 10px;
  color: #5d6b73;
  font-size: 10px;
  border: 1px solid #9ea6aa;
  background: #f1f4f2;
}

.credential-rules b {
  color: #315f7f;
  font-size: 11px;
}

.user-form input[readonly] {
  color: #56636b;
  background: #e7eaec !important;
}

.generated-login {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-items: stretch;
}

.generated-login input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  margin-top: 0 !important;
  color: #315f7f !important;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.generated-login input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: #8a9aa5;
}

.user-permissions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  margin-top: 3px;
  padding: 9px 10px;
  border: 1px solid #9ea6aa;
  background: #f4f6f7;
}

.user-permissions > b {
  grid-column: 1 / -1;
  color: #315f7f;
  font-size: 11px;
}

.permission-select-all label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #5d6b73;
}

.permission-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 10px;
}

.permission-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  font-size: 11px;
  border: 1px solid #b2b7ba;
  background: #fff;
}

.permission-checks label:hover {
  background: #eaf1f7;
  border-color: #9fb6ca;
}

.permission-matrix {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px 8px;
}

.user-permissions input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  flex: 0 0 13px;
  accent-color: #315f7f;
}

.perm-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.6fr) repeat(8, 42px);
  gap: 3px 8px;
  align-items: center;
  color: #3c4a54;
}

.perm-head {
  font-weight: 700;
  font-size: 10px;
  color: #315f7f;
  border-bottom: 1px solid #9ea6aa;
  padding-bottom: 2px;
}

.perm-head span,
.perm-row label {
  text-align: center;
}

.perm-module {
  font-weight: 600;
  font-size: 10px;
}

.perm-row label {
  display: flex;
  justify-content: center;
  align-items: center;
}

.perm-global-row .perm-global {
  grid-column: span 2;
  justify-content: flex-start;
  gap: 4px;
  font-weight: 600;
  color: #315f7f;
  text-align: left;
}

button:disabled {
  opacity: .45;
  pointer-events: none;
}

.generated-login button {
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #9faeb7;
  border-radius: 3px;
  color: #294b60;
  background: linear-gradient(#fff, #e4eaed);
  box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0,0,0,.07);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
  flex-shrink: 0;
  cursor: pointer;
  font: 600 12px 'Segoe UI', sans-serif;
  white-space: nowrap;
}

.sif-hint {
  font-size: 11px;
  color: #6b7685;
  font-weight: 400;
  margin-top: 2px;
}

.generated-login button:hover {
  border-color: #718c9e;
  background: linear-gradient(#fff, #e4f0f7);
  box-shadow: 0 2px 4px rgba(37,55,67,.15);
}

.generated-login button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 3px rgba(35,48,57,.2);
}

.generated-login input.generated {
  border-color: #4f9f3d !important;
  box-shadow: 0 0 0 2px rgba(79,159,61,.15);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #f3f6f1, #dce3dc);
}

.login-screen.open {
  display: grid;
}

.login-window {
  width: 390px;
  border: 1px solid #6f7980;
  background: #edf0f1;
  box-shadow: 7px 10px 24px rgba(26,39,47,.32);
  animation: modal-enter .2s ease-out;
}

.login-titlebar {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 2px 7px;
  color: #26343d;
  font-size: 11px;
  background: linear-gradient(#f5f7f8, #d6dce0);
  border-bottom: 1px solid #929ca3;
}

.login-titlebar img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.login-content {
  padding: 24px 28px 22px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-brand > img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
}

.login-symbol {
  width: 45px;
  height: 44px;
  overflow: hidden;
}

.login-symbol img {
  width: 230px;
  height: 44px;
  max-width: none;
}

.login-brand b,
.login-brand span {
  display: block;
}

.login-brand b {
  color: #4f9f3d;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
}

.login-brand span {
  color: #315f7f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
}

.login-content h2 {
  margin: 0 0 15px;
  color: #315f7f;
  font-size: 13px;
  font-weight: 600;
}

.login-content label {
  display: block;
  margin-top: 9px;
  color: #46545d;
  font-size: 11px;
}

.login-content input {
  width: 100%;
  height: 27px;
  margin-top: 3px;
}

.login-content > button {
  width: 100%;
  height: 30px;
  margin-top: 8px;
  color: #fff;
  font-weight: 600;
  border: 1px solid #3d7f30;
  border-radius: 3px;
  background: linear-gradient(#61ae4e, #478f38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.login-content > button:hover {
  background: linear-gradient(#6ab858, #4b963c);
  box-shadow: 0 2px 5px rgba(43,79,37,.22);
}

.login-content small {
  display: block;
  margin-top: 13px;
  color: #758087;
  text-align: center;
  font-size: 9px;
}

.login-error {
  min-height: 17px;
  padding-top: 5px;
  color: #a23d35;
  font-size: 10px;
}

.delete-confirm {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px;
}

.delete-confirm b {
  color: #8f332c;
  font-size: 12px;
}

.delete-confirm span {
  color: #5f6d75;
  line-height: 1.45;
}


.login-legal { margin:10px 0 0; font-size:11px; color:#647987; text-align:center; }
.login-legal a,.sif-legal-link { color:inherit; }
.sif-legal-link { font-size:11px; margin-right:6px; opacity:.85; }

.login-brand-box { position:relative; display:flex; justify-content:center; align-items:center; }
.login-brand-box .login-brand { transition:opacity .25s ease, transform .25s ease; }
.login-loader { position:absolute; inset:0; display:flex; justify-content:center; align-items:center; opacity:0; transform:scale(.85); transition:opacity .25s ease, transform .3s ease; pointer-events:none; }
.login-loader svg { height:100%; max-height:96px; aspect-ratio:200 / 140; overflow:visible; }
.login-loader .ll-globo { transform-origin:100px 100px; }
.login-loader .ll-terras { fill:#e3f8d6; opacity:.9; }
.login-loader .ll-grade ellipse, .login-loader .ll-grade line { fill:none; stroke:#fff; stroke-opacity:.28; stroke-width:1.2; }
.login-loader .ll-mer { transform-origin:100px 100px; }
.login-loader .ll-borda { fill:none; stroke:#fff; stroke-opacity:.5; stroke-width:1.5; }
.login-loader .ll-orbita-tras ellipse { fill:none; stroke:#3c9b2f; stroke-opacity:.3; stroke-width:3; stroke-dasharray:4 6; }
.login-loader .ll-orbita-frente path { fill:none; stroke:#3c9b2f; stroke-opacity:.75; stroke-width:3; stroke-dasharray:4 6; }
.login-loader .ll-no { stroke:#fff; stroke-width:2.5; }
.login-loader .ll-nos-tras { opacity:.8; }
.login-loader .ll-verde { fill:#3c9b2f; } .login-loader .ll-teal { fill:#1f8a8a; } .login-loader .ll-azul { fill:#1f5fae; }
.login-loader-panes polygon { fill:#3c9b2f; }
.login-loader-panes { transform-origin:100px 100px; }
.ll-logo { position:absolute; left:50%; top:50%; width:300px; max-width:100%; aspect-ratio:1670 / 372; transform:translate(-50%, -50%); opacity:0; pointer-events:none; }
.ll-logo span { position:absolute; top:0; height:100%; background:url(../../assets/logos/conquista-frota-logo-transparent.png) no-repeat; }
.ll-logo-icone { left:0; width:24%; background-size:416.7% 100% !important; background-position:0 0 !important; }
.ll-logo-texto { left:24%; width:76%; background-size:131.6% 100% !important; background-position:100% 0 !important; transform-origin:0 50%; }
#loginForm.entrando .login-brand { opacity:0; transform:none; transition:none; }
#loginForm.entrando .ll-logo { opacity:1; }
#loginForm.entrando .ll-logo-texto { animation:ll-letras .8s cubic-bezier(.65,0,.35,1) forwards; }
#loginForm.entrando .ll-logo-icone { animation:ll-icone 1.5s cubic-bezier(.45,0,.25,1) forwards; }
#loginForm.entrando .login-loader-panes { display:none; }
#loginForm.entrando .login-loader { opacity:1; transform:none; }
#loginForm.entrando .ll-globo { animation:ll-surge 1s .75s cubic-bezier(.25,.8,.35,1) both; }
#loginForm.entrando .ll-orbita-tras, #loginForm.entrando .ll-orbita-frente, #loginForm.entrando .ll-no { animation:ll-aparece .9s 1.25s ease both; }
#loginForm.entrando .ll-terras { animation:ll-gira 3.2s linear infinite; }
#loginForm.entrando .ll-mer { animation:ll-meridiano 3.2s linear infinite; }
#loginForm.entrando .ll-mer:nth-child(5) { animation-delay:-1.07s; }
#loginForm.entrando .ll-mer:nth-child(6) { animation-delay:-2.13s; }
@keyframes ll-letras { 0% { transform:none; opacity:1; filter:blur(0); } 60% { opacity:.35; } 100% { transform:translateX(-6%) scaleX(.15); opacity:0; filter:blur(3px); } }
@keyframes ll-icone { 0% { transform:none; opacity:1; filter:blur(0); } 50% { transform:translateX(158%); opacity:1; filter:blur(0); } 100% { transform:translateX(158%) scale(.62) rotate(-30deg); opacity:0; filter:blur(2px); } }
@keyframes ll-surge { 0% { transform:scale(.55) rotate(25deg); opacity:0; filter:blur(4px); } 55% { opacity:1; filter:blur(0); } 100% { transform:none; opacity:1; filter:blur(0); } }
@keyframes ll-aparece { from { opacity:0; } to { opacity:1; } }
@keyframes ll-gira { from { transform:translateX(0); } to { transform:translateX(-248px); } }
@keyframes ll-meridiano { 0% { transform:scaleX(1); } 50% { transform:scaleX(0); } 100% { transform:scaleX(-1); } }
#loginOverlay.login-saindo { opacity:0; transition:opacity .7s cubic-bezier(.4,0,.2,1); }
#loginOverlay.login-saindo .login-window { transform:scale(1.03); transition:transform .7s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion: reduce) { #loginForm.entrando .ll-terras, #loginForm.entrando .ll-mer { animation-duration:9s; } }

#aponto-baloes { position:fixed; top:14px; right:14px; z-index:10050; display:flex; flex-direction:column; gap:10px; width:min(380px, calc(100vw - 28px)); pointer-events:none; }
.aponto-balao { position:relative; padding:12px 38px 12px 14px; border-radius:6px; font-size:12px; line-height:1.45; box-shadow:0 10px 26px rgba(16,40,56,.22); pointer-events:auto; animation:balao-entra .25s ease-out; }
.aponto-balao b { display:block; font-size:13px; }
.aponto-balao ul { margin:6px 0 0; padding-left:18px; }
.aponto-balao.erro { border:1px solid #d58b7f; border-left:5px solid #b8402e; background:#fff3f0; color:#7a2a1f; }
.aponto-balao.aviso { border:1px solid #d7b25a; border-left:5px solid #c48a12; background:#fffaf0; color:#5f4300; }
.aponto-balao-x { position:absolute; top:8px; right:8px; width:24px; height:24px; padding:0; border:0; border-radius:4px; background:transparent; color:inherit; font-size:13px; cursor:pointer; }
.aponto-balao-x:hover { background:rgba(0,0,0,.08); }
@keyframes balao-entra { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:none; } }
