  body.oo-body{
    margin:0 !important;
    background:#f3f5f9 !important;
    color:#1f2937 !important;
    font-size:13px !important;
  }

  .login-shell{
    min-height:100vh !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:20px !important;
  }

  .login-card{
    width:100% !important;
    max-width:420px !important;
    background:#fff !important;
    border:1px solid #e5e7eb !important;
    border-radius:16px !important;
    padding:20px !important;
    box-shadow:0 4px 16px rgba(0,0,0,.06) !important;
  }

/* =========================================================
     APP
  ========================================================= */

  .oo-app{
    min-height:100vh !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    background:#f3f5f9 !important;
  }


  /* =========================================================
     TOPBAR
  ========================================================= */

  .oo-topbar{
    width:100% !important;
    height:58px !important;
    background:#ffffff !important;
    border-bottom:1px solid #e5e7eb !important;
    box-shadow:0 1px 5px rgba(0,0,0,.04) !important;
    position:relative !important;
    z-index:1000 !important;
  }

  .oo-topbar-inner{
    width:100% !important;
    height:58px !important;
    display:flex !important;
    align-items:center !important;
    padding:0 18px !important;
    gap:12px !important;
  }


  /* =========================================================
     MARCA
  ========================================================= */

  .oo-topbar-brand{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-shrink:0 !important;
    margin-right:10px !important;
  }

  .oo-brand-mark{
    width:32px !important;
    height:32px !important;
    border-radius:8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:#0d6efd !important;
    color:#ffffff !important;
    font-size:12px !important;
    font-weight:800 !important;
  }

  .oo-topbar-brand-text{
    display:flex !important;
    align-items:center !important;
  }

  .oo-brand-title{
    font-size:14px !important;
    font-weight:700 !important;
    color:#1f2937 !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }


  /* =========================================================
     MENU PRINCIPAL
  ========================================================= */

  .oo-topbar-nav{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    height:100% !important;
    gap:0 !important;
    flex:1 !important;
  }

  .oo-topbar-link{
    height:58px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;

    border:none !important;
    background:transparent !important;

    padding:0 9px !important;

    color:#4b5563 !important;
    font-size:12px !important;
    font-weight:600 !important;

    white-space:nowrap !important;
    cursor:pointer !important;
  }

  .oo-topbar-link:hover{
    background:#f8fafc !important;
    color:#0d6efd !important;
  }

  .oo-topbar-link.active{
    color:#0d6efd !important;
    box-shadow:inset 0 -2px 0 #0d6efd !important;
  }

  .oo-chevron{
    font-size:10px !important;
    color:#9ca3af !important;
    margin-left:2px !important;
  }


  /* =========================================================
     DROPDOWNS
  ========================================================= */

  .oo-dropdown-wrap{
    position:relative !important;
    height:100% !important;
    display:flex !important;
    align-items:center !important;
  }

  .oo-dropdown-menu{
    display:none !important;

    position:absolute !important;
    top:52px !important;
    left:0 !important;

    min-width:205px !important;

    padding:6px !important;

    background:#ffffff !important;

    border:1px solid #e5e7eb !important;
    border-radius:9px !important;

    box-shadow:0 10px 28px rgba(15,23,42,.12) !important;

    z-index:3000 !important;
  }

  .oo-dropdown-wrap.open > .oo-dropdown-menu{
    display:block !important;
  }

  .oo-dropdown-right{
    left:auto !important;
    right:0 !important;
  }

  .oo-dropdown-item{
    display:block !important;

    width:100% !important;

    border:none !important;
    background:transparent !important;

    padding:8px 10px !important;

    text-align:left !important;

    color:#374151 !important;

    font-size:12px !important;
    font-weight:500 !important;

    border-radius:6px !important;

    white-space:nowrap !important;

    cursor:pointer !important;
  }

  .oo-dropdown-item:hover:not(:disabled){
    background:#f3f6fb !important;
    color:#0d6efd !important;
  }

  .oo-dropdown-disabled{
    color:#aeb5bf !important;
    opacity:.65 !important;
    cursor:not-allowed !important;
  }

  .oo-dropdown-divider{
    height:1px !important;
    background:#e5e7eb !important;
    margin:5px 3px !important;
  }

  .oo-dropdown-danger{
    color:#dc3545 !important;
  }

  .oo-dropdown-danger:hover{
    background:#fff1f2 !important;
    color:#dc3545 !important;
  }


  /* =========================================================
     LADO DIREITO
  ========================================================= */

  .oo-topbar-right{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:6px !important;

    height:100% !important;

    margin-left:auto !important;

    flex-shrink:0 !important;
  }

  .oo-unit-button,
  .oo-user-button{
    height:34px !important;

    display:flex !important;
    align-items:center !important;
    gap:5px !important;

    padding:0 10px !important;

    background:#ffffff !important;

    border:1px solid #e5e7eb !important;
    border-radius:18px !important;

    color:#374151 !important;

    font-size:11.5px !important;
    font-weight:600 !important;

    white-space:nowrap !important;

    cursor:pointer !important;
  }

  .oo-unit-button:hover,
  .oo-user-button:hover{
    background:#f8fafc !important;
  }

  .oo-user-name{
    max-width:145px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }


  /* =========================================================
     MOBILE - POR ENQUANTO ESCONDIDO
  ========================================================= */

  .oo-menu-toggle{
    display:none !important;
  }


  /* =========================================================
     CONTEÚDO
  ========================================================= */

  .oo-main{
    width:100% !important;
    flex:1 !important;
    padding:16px 18px !important;
    overflow-x:auto !important;
  }

  .page-header{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    margin-bottom:12px !important;
  }

  .page-title{
    font-size:18px !important;
    font-weight:700 !important;
    margin:0 !important;
  }

  .page-subtitle,
  .muted{
    color:#6b7280 !important;
    font-size:12px !important;
  }

  .section-title{
    font-weight:700 !important;
    margin:0 0 .35rem 0 !important;
    font-size:14px !important;
  }

  .card-lite,
  .table-card,
  .metric-card{
    border:1px solid #e5e7eb !important;
    border-radius:14px !important;
    background:#fff !important;
    box-shadow:0 2px 10px rgba(0,0,0,.04) !important;
  }

  .card-lite{
    padding:14px !important;
  }

  .table-card{
    overflow:hidden !important;
  }

  .table-toolbar{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    padding:12px 14px !important;
    border-bottom:1px solid #e5e7eb !important;
  }

  .table{
    margin-bottom:0 !important;
    font-size:12px !important;
  }

.table td,
.table th{
  vertical-align:middle !important;
  white-space:nowrap !important;
  padding:0 8px !important;
  line-height:1 !important;
}

  .table thead th{
    font-size:11px !important;
    text-transform:uppercase !important;
    letter-spacing:.02em !important;
    color:#6b7280 !important;
    background:#fafbfc !important;
    padding:6px 8px !important;
  }

.table tbody tr{
  height:28px !important;
}

.table tbody td{
  height:28px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

  .table tbody tr:hover{
    background:#fafbfc !important;
  }

  .table .btn-sm{
    padding:2px 8px !important;
    font-size:11px !important;
  }

  .oo-row-click{
    cursor:pointer !important;
  }

  .item-row{
    border:1px solid #e5e7eb !important;
    border-radius:10px !important;
    padding:.6rem !important;
    margin-bottom:.45rem !important;
    background:#fff !important;
  }

  .oo-badge{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:38px !important;
    min-height:20px !important;
    padding:2px 8px !important;
    border-radius:999px !important;
    font-size:11px !important;
    font-weight:700 !important;
    line-height:1 !important;
    border:1px solid rgba(0,0,0,.08) !important;
  }

  .oo-days-green{ background:#198754 !important; color:#fff !important; }
  .oo-days-yellow{ background:#ffc107 !important; color:#111 !important; }
  .oo-days-red{ background:#dc3545 !important; color:#fff !important; }
  .oo-days-gray{ background:#e9ecef !important; color:#495057 !important; }

  .oo-status-green{ background:#198754 !important; color:#fff !important; }
  .oo-status-yellow{ background:#ffc107 !important; color:#111 !important; }
  .oo-status-orange{ background:#fd7e14 !important; color:#fff !important; }
  .oo-status-red{ background:#dc3545 !important; color:#fff !important; }
  .oo-status-gray{ background:#e9ecef !important; color:#495057 !important; }

  .metric-grid{
    display:grid !important;
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
    gap:10px !important;
  }

  .metric-card{
    padding:12px !important;
  }

  .metric-label{
    color:#6b7280 !important;
    font-size:11px !important;
    margin-bottom:4px !important;
  }

  .metric-value{
    font-size:20px !important;
    font-weight:800 !important;
    line-height:1.1 !important;
  }

  .form-label{
    display:block !important;
    margin-bottom:4px !important;
    font-size:12px !important;
    font-weight:600 !important;
  }

  .form-control,
  .form-select,
  textarea{
    font-size:13px !important;
    padding:6px 10px !important;
    width:100% !important;
  }

  .form-control,
  .form-select{
    height:36px !important;
  }

  textarea.form-control{
    height:70px !important;
  }

  .btn{
    font-size:12.5px !important;
  }

  .os-form-grid{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
    align-items:end !important;
  }

  .os-form-grid > div{
    margin:0 !important;
    padding:0 !important;
  }

  .os-col-4{
    grid-column:1 / span 2 !important;
  }

  .col-cliente{ width:180px; }
  .col-veiculo{ width:140px; }
  .col-placa{ width:90px; }
  .col-tipo{ width:90px; }
  .col-categoria{ width:110px; }
  .col-status{ width:120px; }
  .col-dias{ width:70px; }
  .col-valor{ width:90px; }

  @media (max-width: 991px){
    .oo-app{
      flex-direction:column !important;
    }

    .oo-sidebar{
      width:100% !important;
      min-width:100% !important;
    }

    .oo-menu-toggle{
      display:block !important;
    }

    .oo-nav{
      display:none !important;
      margin-top:8px !important;
    }

    .oo-nav.open{
      display:flex !important;
    }

    .metric-grid{
      grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    }

    .os-form-grid{
      grid-template-columns:1fr 1fr !important;
    }
  }

  @media (max-width: 640px){
    .oo-main{
      padding:10px !important;
    }

    .metric-grid,
    .os-form-grid{
      grid-template-columns:1fr !important;
    }

    .os-col-4{
      grid-column:span 1 !important;
    }

    .page-header,
    .table-toolbar{
      flex-direction:column !important;
      align-items:stretch !important;
    }
  }

/* =========================================================
   TOPBAR FINAL - OFICINA ORGANIZADA
   Compacta / estilo Flowmed
========================================================= */

.oo-topbar{
  width:100% !important;
  min-height:54px !important;
  height:54px !important;
  padding:0 !important;
  margin:0 !important;

  background:#ffffff !important;
  border-bottom:1px solid #e5e7eb !important;

  display:flex !important;
  align-items:center !important;

  position:relative !important;
  z-index:1000 !important;
}


/* CONTAINER DA BARRA */

.oo-topbar > .container-fluid{
  width:100% !important;
  max-width:none !important;

  height:25px !important;

  display:flex !important;
  align-items:flex-start !important;

  padding-left:12px !important;
  padding-right:12px !important;

  margin:0 !important;
}


/* =========================================================
   LOGO / MARCA
========================================================= */

.oo-topbar .navbar-brand{
  height:54px !important;

  display:flex !important;
  align-items:center !important;

  margin:0 14px 0 0 !important;
  padding:0 !important;

  flex-shrink:0 !important;
}

.oo-topbar .navbar-brand > div:first-child{
  width:30px !important;
  height:30px !important;

  border-radius:8px !important;

  margin:0 !important;
}

.oo-topbar .navbar-brand span{
  font-size:13px !important;
  font-weight:700 !important;

  white-space:nowrap !important;
}


/* =========================================================
   ÁREA DOS MENUS
========================================================= */

.oo-topbar .navbar-collapse{
  height:54px !important;

  display:flex !important;
  align-items:center !important;

  padding:0 !important;
  margin:0 !important;
}


/* LISTAS DE MENU */

.oo-topbar .navbar-nav{
  height:54px !important;

  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;

  gap:5px !important;

  padding:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
}


/* NÃO DEIXAR OS ITENS ESTICAREM */

.oo-topbar .nav-item{
  flex:0 0 auto !important;

  display:flex !important;
  align-items:center !important;

  height:54px !important;

  margin:0 !important;
  padding:0 !important;
}


/* =========================================================
   BOTÕES DOS 6 MENUS
========================================================= */

.oo-topbar .nav-link{
  width:auto !important;
  min-width:0 !important;

  height:32px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:0 11px !important;
  margin:0 !important;

  background:#f8fafc !important;

  border:1px solid #e5e7eb !important;
  border-radius:8px !important;

  color:#4b5563 !important;

  font-size:12px !important;
  font-weight:600 !important;

  line-height:1 !important;

  white-space:nowrap !important;

  box-shadow:none !important;
}


/* HOVER */

.oo-topbar .nav-link:hover{
  background:#eef4ff !important;
  border-color:#cfe0ff !important;

  color:#0d6efd !important;
}


/* SETINHA DO DROPDOWN */

.oo-topbar .dropdown-toggle::after{
  margin-left:6px !important;
  vertical-align:middle !important;
}


/* =========================================================
   DROPDOWN
========================================================= */

.oo-topbar .dropdown-menu{
  min-width:205px !important;

  margin-top:3px !important;
  padding:6px !important;

  border:1px solid #e5e7eb !important;
  border-radius:10px !important;

  background:#ffffff !important;

  box-shadow:0 10px 25px rgba(15,23,42,.12) !important;
}


/* ITENS DO DROPDOWN */

.oo-topbar .dropdown-item{
  border-radius:6px !important;

  padding:8px 10px !important;

  font-size:12px !important;
  font-weight:500 !important;

  color:#374151 !important;
}


.oo-topbar .dropdown-item:hover:not(.disabled){
  background:#f3f6fb !important;
  color:#0d6efd !important;
}


/* =========================================================
   OFICINA + USUÁRIO - LADO DIREITO
========================================================= */

.oo-topbar .navbar-nav.ms-auto{
  margin-left:auto !important;

  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;

  gap:5px !important;

  flex-shrink:0 !important;
}


.oo-topbar .navbar-nav.ms-auto .nav-link{
  background:#ffffff !important;

  border:1px solid #dfe3e8 !important;

  border-radius:17px !important;

  padding:0 10px !important;

  font-size:11.5px !important;
}


/* =========================================================
   ÁREA PRINCIPAL
========================================================= */

.oo-main{
  width:100% !important;

  padding:14px 18px !important;
  margin:0 !important;

  background:#f3f5f9 !important;

  overflow-x:auto !important;
}


/* =========================================================
   BOTÃO DASHBOARD ABAIXO DA BARRA
========================================================= */

#btnDash{
  width:auto !important;
  min-width:0 !important;

  padding:6px 12px !important;
  margin:0 !important;

  background:#ffffff !important;

  border:1px solid #dfe3e8 !important;
  border-radius:7px !important;

  color:#374151 !important;

  font-size:12px !important;
  font-weight:600 !important;
}


#btnDash:hover{
  background:#eef4ff !important;
  border-color:#cfe0ff !important;

  color:#0d6efd !important;
}

/* =========================================================
   AJUSTE DE POSIÇÃO DA TOPBAR ATUAL
   Não altera estrutura, tamanho ou dropdowns
========================================================= */

#appShell{
  margin:0 !important;
  padding:0 !important;
}

#appShell > .oo-navbar-v2{
  margin-top:0 !important;
  margin-bottom:0 !important;
  position:relative !important;
  top:0 !important;
}

#appShell > .oo-main{
  margin-top:0 !important;
}

/* =========================================================
   GARANTE QUE TELAS OCULTAS NÃO OCUPEM ESPAÇO
========================================================= */

.d-none{
  display:none !important;
}

#loginScreen.d-none{
  display:none !important;
  min-height:0 !important;
  height:0 !important;
  padding:0 !important;
  margin:0 !important;
}

/* =========================================================
   TELA DE ORDENS - INDICADORES OPERACIONAIS
   Isolado da Nova/Editar OS
========================================================= */

#osKpiGrid{
  width:100% !important;
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:8px !important;
  margin:0 0 8px 0 !important;
  padding:0 !important;
}

#osKpiGrid .os-kpi-card{
  display:block !important;
  width:auto !important;
  min-width:0 !important;
  min-height:58px !important;
  margin:0 !important;
  padding:9px 11px !important;
  border-radius:8px !important;
  box-sizing:border-box !important;
}

/* Container do Card - Visual Moderno, Compacto e Centralizado */
.oo-login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px; /* Controla o espaçamento macro de forma limpa */
  transition: all 0.3s ease;
}

/* Cabeçalho */
.oo-login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oo-login-brand {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.oo-login-subtitle {
  font-size: 13px;
  color: #64748b;
}

/* Estrutura dos Formulários (Só ocupa espaço o que estiver visível) */
.oo-login-form-group {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Espaçamento padrão e compacto entre inputs */
}

.oo-input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Customização sutil dos Labels e Inputs para "Cara de Sistema" */
.oo-login-card .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0;
}

.oo-login-card .form-control {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.oo-login-card .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Rodapé do Login */
.oo-login-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.oo-login-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oo-login-link-item {
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}

.oo-login-link-item:hover {
  text-decoration: underline;
  color: #2563eb;
}

/* Botões Modernizados */
.oo-login-card .btn {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.oo-login-card .btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
}

.oo-login-card .btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}
