:root {
  --verde-esc: #1B4333;
  --verde-acento: #20B038;
  --branco: #FFFFFF;
  --cinza: #f5f7f6;
  --texto: #222;
  --fonte: Lastica;
  --shadow: 0 2px 10px rgba(27, 67, 51, 0.5);
  --shadow-min: 0 2px 5px rgba(27, 67, 51, 0.5);
  --radius: 0.75rem;
  --transition: all 0.3s ease
}

@font-face {
  font-family: Lastica;
  src: url("../../assets/fonts/lastica.woff2") format("woff2");
  font-display: swap
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  font-size: 100%;
  scroll-padding-top: 3rem
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--cinza) url('../../assets/img/fundo.svg') right bottom fixed no-repeat;
  background-size: 50vw;
  padding-top: 56px;
  /* espaço para header fixo (ajustado) */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0
}

.container-fluid {
  max-width: 90%;
  margin: 0 auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--fonte);
  color: var(--verde-esc);
  line-height: 1.5;
  margin: 0 0 .5rem 0
}

h1 {
  font-size: 1.8rem;
  text-shadow: 1px 1px 2px var(--verde-acento);
  font-weight: 700;
  padding-top: 1rem
}

h2 {
  font-size: 1.3rem;
  text-shadow: 1px 1px 2px var(--verde-acento);
  font-weight: 600
}

h3 {
  font-size: 1.1rem;
  font-weight: 600
}

h4 {
  font-size: 1rem;
  font-weight: 500
}

.lead {
  margin-bottom: 1rem;
  color: #333;
  font-size: 1rem;
  text-shadow: 0.1rem 0.1rem 0.6rem #fff;
}

.muted,
.small {
  font-size: .85rem;
  color: #444
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--verde-esc);
  color: var(--branco);
  padding: 4px 10px;
  font-size: .8rem;
  border-radius: 999px;
  font-weight: 600
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition)
}

.ctas {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap
}

.btn {
  background: var(--verde-esc);
  color: var(--branco);
  padding: .5rem .875rem;
  border-radius: .5rem;
  font-weight: 600;
  display: inline-block;
  font-size: .95rem;
  border-style: hidden;

  justify-content: center
}

/* Floating Action Button for Mobile */
.btn-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  transition: all 0.2s ease;
}

.btn-fab:active {
  transform: scale(0.9);
}

.btn:hover {
  background: var(--verde-acento);
  color: var(--branco)
}

.btn.outline {
  background: var(--branco);
  padding: 0 .5rem;
  justify-content: center;
  text-align: right;
  border: 1px solid rgba(27, 67, 51, .55);
  color: var(--verde-esc)
}

.btn.outline:hover {
  background: var(--verde-acento);
  color: var(--branco)
}

ul.clean {
  padding-left: 1.125rem
}

.section {
  margin: 1rem 0;
  padding: 1rem
}

.hero {
  position: relative;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 0.5rem 1rem;
  flex-wrap: wrap;
  overflow: hidden
}

.hero>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%)
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .55);
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%)
}

.hero-left {
  flex: 1;
  z-index: 2
}

.hero-right {
  flex: 1;
  max-width: 22.5rem;
  z-index: 2
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 21.25rem;
  gap: 1.125rem
}

.process-list {
  display: grid;
  gap: .875rem;
  margin: 1.125rem 0
}

.process-list {
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr))
}

.quem-somos {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.75rem;
  align-items: center
}

.caixa,
.contact-caixa,
.step {
  background: var(--branco);
  border-radius: var(--radius);
  box-shadow: var(--shadow)
}

.caixa {
  padding: .875rem;
  text-align: left
}

.caixa strong {
  color: var(--verde-acento)
}

.contact-caixa {
  padding: 1rem
}

.service-img {
  width: 100%;
  height: 15rem;
  margin-bottom: .75rem;
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  overflow: hidden
}

.quem-somos .service-img,
.quem-somos img,
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .75rem;
  min-height: 18.75rem
}

.step {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  padding: 1rem
}

.step .num {
  font-family: var(--fonte);
  font-size: 3.75rem;
  text-align: center;
  font-weight: 800;
  line-height: 1;
  color: var(--verde-acento);
  min-width: 3.75rem
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem
}

.contact-item a {
  display: flex
}

.contact-item img {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--verde-acento);
  flex-shrink: 0;
  margin-top: .25rem
}

.contact-label {
  font-weight: 600;
  color: var(--texto)
}

.contact-sublabel {
  font-size: .875rem;
  color: #333
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--verde-esc);
  color: var(--branco);
  padding: 0.75rem 0.5rem;
  border-bottom: .25rem solid var(--verde-acento);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
}

header.header-scrolled {
  padding: 0.35rem 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

header .container,
header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.brand {
  display: flex;
  align-items: center;
  gap: .5rem
}

.logo {
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  transition: all 0.4s ease;
}

header.header-scrolled .logo {
  width: 1.75rem;
  height: 1.75rem;
}

.logo img {
  width: 100%;
  height: auto;
  transition: all 0.4s ease;
}

.brand-text {
  font-family: var(--fonte);
  display: flex;
  flex-direction: column;
  line-height: 1.2
}

.brand-name {
  font-weight: 600;
  font-size: .9375rem
}

.brand-subtitle {
  font-size: .5rem;
  opacity: .7;
  max-height: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

header.header-scrolled .brand-subtitle {
  max-height: 0;
  opacity: 0;
  margin-top: -2px;
}

nav {
  position: relative
}

.nav-list {
  display: flex;
  gap: .625rem;
  list-style: none;
  align-items: center;
  margin-bottom: 0
}

.nav-list a {
  color: rgba(255, 255, 255, .95);
  padding: .25rem .5rem;
  border-radius: .25rem;
  font-weight: 500;
  font-size: .7rem;
  transition: var(--transition)
}

.nav-list a:hover {
  background: var(--branco);
  color: var(--verde-esc);
  opacity: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: .25rem;
  cursor: pointer
}

.menu-toggle span {
  width: 1.25rem;
  height: .125rem;
  background: var(--branco);
  border-radius: .125rem
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 1rem 0
}

.carousel-track {
  display: flex;
  transition: transform .5s ease
}

.carousel .caixa {
  flex: 0 0 auto;
  width: calc(100% / 3 - 20px);
  margin: 10px;
  text-align: left
}

.carousel .caixa img {
  max-width: 100%;
  height: auto;
  display: block
}

.carousel-btn {
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  background: var(--verde-esc);
  color: var(--branco);
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  z-index: 5;
  opacity: .85;
  transition: var(--transition)
}

.carousel-btn:hover {
  opacity: 1
}

.carousel-btn.prev {
  left: 10px
}

.carousel-btn.next {
  right: 10px
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: .5rem 0
}

.carousel-indicators button {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: none;
  background: var(--verde-esc);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-min)
}

.carousel-indicators button.active {
  background: var(--verde-acento)
}

#contato form label {
  display: block;
  font-weight: 600;
  margin-bottom: .25rem;
  color: var(--texto)
}

#contato input,
#contato select,
#contato textarea {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition)
}

#contato input:focus,
#contato select:focus,
#contato textarea:focus {
  outline: 0;
  border-color: var(--verde-acento);
  box-shadow: 0 0 0 2px rgba(32, 176, 56, .25)
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem
}

.field-group {
  position: relative
}

.error-message {
  position: absolute;
  top: -10px;
  right: 0;
  background: #e63946;
  color: #fff;
  padding: 6px 10px;
  font-size: .85rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .15s ease, transform .15s ease
}

.error-message.show {
  opacity: 1;
  transform: translateY(0)
}

.error-message::after {
  content: "";
  position: absolute;
  bottom: -12px;
  right: 15px;
  border-width: 6px;
  border-style: solid;
  border-color: #e63946 transparent transparent transparent
}

.invalid {
  border-color: #e63946 !important;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, .25);
  transition: border-color .3s ease, box-shadow .3s ease
}

.modal-erro {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #222;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  z-index: 9999;
  display: none;
  max-width: 500px;
  width: 90%;
  text-align: left
}

.modal-erro.show {
  display: block;
  animation: fadeIn .3s ease
}

.modal-erro h3 {
  margin-top: 0;
  margin-bottom: .75rem;
  font-family: var(--fonte);
  color: var(--verde-esc)
}

.modal-erro p {
  margin: .25rem 0
}

.modal-erro .close {
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  color: #555
}

.modal-erro .close:hover {
  color: #000
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px)
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0)
  }
}

/* Budget Autocomplete */
.autocomplete-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 10px 10px;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.autocomplete-item {
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #eee;
}

.autocomplete-item:hover {
  background: #f8f9fa;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.email-suggest-box {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 300px;
  z-index: 20;
  border-radius: 6px;
  overflow: hidden;
  display: none
}

.email-suggest {
  padding: 8px 12px;
  cursor: pointer;
  transition: background .2s
}

.email-suggest.selected,
.email-suggest:hover {
  background: #20b038;
  color: #fff
}

.footer {
  background: var(--verde-esc);
  color: var(--branco);
  padding: 2.5rem 1.25rem 1.25rem;
  font-size: .875rem;
  border-top: .25rem solid var(--verde-acento)
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.875rem;
  max-width: 1200px;
  margin: 0 auto
}

.footer h3,
.footer h4 {
  margin-bottom: .625rem;
  color: var(--branco)
}

.footer-links ul {
  list-style: none
}

.footer-links li {
  margin-bottom: .5rem
}

.footer-links a,
.footer-social a {
  color: var(--branco)
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--verde-acento)
}

.footer-social .social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center
}

.footer-social .social-icons img {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--branco)
}

.social-icons img:hover {
  fill: var(--verde-acento)
}

.footer-bottom {
  text-align: center;
  margin-top: 1.875rem;
  padding-top: .9375rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8125rem;
  color: #eee
}

@media (min-width:880px) {
  header {
    padding: 1rem .5rem
  }

  .brand-name,
  .brand-subtitle,
  .logo img {
    transition: var(--transition)
  }

  .brand-name {
    font-size: 1.3rem
  }

  .brand-subtitle {
    font-size: .75rem
  }

  header.scrolled {
    padding: .5rem
  }

  header.scrolled .logo img {
    width: 30px;
    height: 30px
  }

  header.scrolled .brand-name {
    font-size: .95rem
  }

  header.scrolled .brand-subtitle {
    font-size: .5rem
  }
}

@media (max-width:880px) {
  h1 {
    font-size: 1.6rem
  }

  h2 {
    font-size: 1.2rem
  }

  h3 {
    font-size: 1rem
  }

  .lead {
    font-size: 1rem
  }

  .two-col {
    grid-template-columns: 1fr 18.75rem
  }

  .carousel .caixa {
    width: calc(100% / 2 - 20px)
  }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--verde-esc);
    padding: .5rem .75rem;
    border-radius: .375rem;
    min-width: 11.25rem
  }

  .nav-list.open {
    display: flex
  }

  .menu-toggle {
    display: flex
  }

  .quem-somos,
  .two-col {
    grid-template-columns: 1fr
  }

  .hero {
    flex-direction: column;
    border-radius: 0
  }

  .contact-caixa,
  .hero-right {
    max-width: 100%;
    width: 100%
  }

  .footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center
  }

  .footer-social {
    margin-top: .625rem
  }

  .footer-social .social-icons {
    justify-content: center
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 6rem;
  }

  .container {
    padding: 0 1rem;
  }

  /* Dashboard Cards on Mobile */
  .row.g-3.mb-5 .col-6 {
    width: 50% !important;
  }

  .row.g-3.mb-5 .col-6:last-child:nth-child(odd) {
    width: 100% !important;
  }

  /* Table to Cards Transformation */
  .table-responsive-stack .table thead {
    display: none;
  }

  .table-responsive-stack tr {
    display: block !important;
    margin-bottom: 1rem !important;
    background: #fff !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-min) !important;
    padding: 1rem !important;
    border: none !important;
    transition: all 0.2s ease !important;
  }

  .table-responsive-stack tr:hover {
    background: rgba(32, 176, 56, 0.05) !important;
    box-shadow: 0 4px 12px rgba(27, 67, 51, 0.15) !important;
    transform: translateY(-2px);
  }

  .table-responsive-stack tr:hover td {
    background: transparent !important;
  }

  .table-responsive-stack td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.5rem 0 !important;
    border: none !important;
    text-align: left !important;
    font-size: 0.9rem;
  }

  /* Labels ocultados no mobile conforme solicitado */
  .table-responsive-stack td::before {
    display: none;
  }

  .table-responsive-stack td:last-child {
    justify-content: center !important;
    margin-top: 0.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #eee !important;
  }

  /* Tabs Scrollable on Mobile */
  .nav-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    border-bottom: none !important;
  }

  .nav-tabs .nav-item {
    white-space: nowrap !important;
  }

  /* Signature Pad */
  .signature-container canvas {
    height: 150px !important;
  }
}

@media (max-width:640px) {
  h1 {
    font-size: 1.4rem
  }

  h2 {
    font-size: 1.1rem
  }

  h3 {
    font-size: .95rem
  }

  .btn {
    font-size: .85rem;
    padding: .4rem .7rem
  }

  body {
    font-size: .95rem;
    background-size: 100vw
  }

  .container {
    padding: 0
  }

  .step .num {
    font-size: 2.75rem
  }

  .carousel .caixa {
    flex: 0 0 100%;
    max-width: 94%;
    margin: 0 3%
  }

  .form-grid {
    grid-template-columns: 1fr
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: .8rem;
  background-color: var(--verde-esc);
  color: var(--branco);
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity .3s ease-in-out, visibility .3s ease-in-out, transform .3s ease-in-out
}

.whatsapp-float:hover {
  background: var(--verde-acento);
  color: var(--branco)
}

.whatsapp-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.whatsapp-float img {
  width: 2rem;
  height: 2rem
}

.loading {
  opacity: 0.6;
  pointer-events: none;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from {
    background-position: 1rem 0;
  }

  to {
    background-position: 0 0;
  }
}

/* Make primary CTAs full width on small screens for better touch targets */
@media (max-width: 768px) {

  .btn.btn-primary,
  .btn.outline,
  .primary-call-to-action,
  .btn.w-100 {
    width: 100% !important;
  }
}

/* ---------------------------------------------------------------------------
   Inline styles moved from view files for consolidation
   Files: app/Views/login/index.php, app/Views/cliente/preencher_dados.php,
          app/Views/os/nova.php, app/Views/os/editar.php,
          app/Views/home.php, app/Views/acompanhamento/timeline.php
--------------------------------------------------------------------------- */

/* Login view small utility styles */
:root {
  --login-primaria: #2d6a4f;
  --login-primaria-hover: #1b4332;
  --login-fundo: #f8f9fa;
}

.login-page-body {
  background-color: var(--login-fundo);
  height: 100vh;
  width: 100vw;
  padding: 0 !important;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-caixa {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  border-radius: 1rem;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.login-caixa .btn-primary {
  background-color: var(--login-primaria);
  border-color: var(--login-primaria);
  padding: 0.8rem;
  font-weight: 600;
}

.login-caixa .btn-primary:hover {
  background-color: var(--login-primaria-hover);
  border-color: var(--login-primaria-hover);
}

.logo-img {
  width: 80px;
  margin-bottom: 1.5rem;
}

/* Cliente: preencher_dados.php helpers */
.field-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--verde-esc);
  font-size: 0.9rem;
}

.field-group input,
.field-group select,
.field-group textarea {
  border-radius: 8px !important;
  border: 1px solid #ddd !important;
  padding: 0.75rem !important;
  background: #fff;
}

.field-group input:focus {
  border-color: var(--verde-acento) !important;
  background: #fdfdfd;
}

.form-check-input:checked {
  background-color: var(--verde-acento);
  border-color: var(--verde-acento);
}

.shadow-inner {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.view-h2 {
  border-color: var(--verde-acento) !important;
  letter-spacing: 0.05rem;
}

.btn-type-caixa {
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  color: #666;
  transition: all 0.2s ease-in-out;
  min-width: 100px;
  display: flex !important;
}

.btn-type-caixa:hover {
  border-color: var(--verde-acento);
  background: rgba(32, 176, 56, 0.02);
  color: var(--verde-esc);
}

.btn-check:checked+.btn-type-caixa {
  border-color: var(--verde-acento);
  background: var(--verde-esc);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-type-caixa i {
  transition: transform 0.2s ease;
}

.btn-type-caixa:active i {
  transform: scale(0.9);
}

/* OS nova / editar shared tweaks */
h1.view-title {
  font-family: 'Lastica', sans-serif;
  color: #1B4333;
}

.form-control::placeholder {
  color: #bbb;
  font-style: italic;
  font-size: 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--verde-acento) !important;
}

.form-control:focus,
.form-select:focus {
  background-color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(32, 176, 56, 0.1);
  border: 1px solid var(--verde-acento) !important;
}

textarea {
  resize: none;
}

/* Tabs */
.nav-tabs .nav-link {
  transition: all 0.3s ease;
  border: 1px solid transparent !important;
  opacity: 0.7;
}

.nav-tabs .nav-link.active {
  background: var(--verde-esc) !important;
  color: #fff !important;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Home small utilities moved */
.cursor-pointer {
  cursor: pointer;
}

.table-hover tbody tr:hover {
  background-color: rgba(32, 176, 56, 0.03) !important;
}

.table-hover tbody tr:hover td {
  background-color: transparent !important;
}

.page-link {
  color: var(--verde-esc);
}

.page-item.active .page-link {
  background-color: var(--verde-esc);
  border-color: var(--verde-esc);
  color: white !important;
}

.form-select,
.form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0.6rem 0.75rem;
}

.form-select:focus,
.form-control:focus {
  border-color: var(--verde-acento);
  box-shadow: 0 0 0 0.25rem rgba(32, 176, 56, 0.1);
}

/* Acompanhamento timeline tweak */
.timeline .caixa {
  margin-left: 20px;
}

/* Small layout utility used by login view */
.login-page-body .login-caixa {
  margin: 0 auto;
}

/* ============================================================================
   ESTILOS PARA ORÇAMENTO - TABELA STYLE
   ============================================================================ */

/* Tabela de orçamento */
#orcamento_table {
  font-size: 0.95rem;
}

#orcamento_table thead th {
  padding: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#orcamento_table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
  border-color: rgba(0, 0, 0, 0.03);
}

#orcamento_table tbody tr {
  transition: all 0.2s ease;
}

#orcamento_table tbody tr:hover {
  background: rgba(32, 176, 56, 0.05) !important;
  box-shadow: inset 2px 0 0 0 var(--verde-acento);
}

/* Badge de tipo */
.badge-tipo {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  font-weight: 600;
}

.badge-tipo-peca {
  background: rgba(27, 67, 51, 0.15);
  color: var(--verde-esc);
}

.badge-tipo-servico {
  background: rgba(32, 176, 56, 0.15);
  color: var(--verde-acento);
}

/* Ícone de remover na tabela */
.btn-remover-item {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.btn-remover-item:hover {
  opacity: 1;
}

/* Resumo de totais */
.resumo-totais {
  background: var(--cinza);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.resumo-totais .total-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.resumo-totais .total-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.resumo-totais .total-geral {
  background: var(--verde-esc);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-top: 1rem;
}

.resumo-totais .total-geral span {
  font-size: 1.25rem;
}

/* Animação suave para alertas */
.alert {
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estado desabilitado para abas */
.nav-link.disabled {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Spinner animation */
.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Melhorias no layout responsivo */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.85rem;
  }

  #orcamento_table thead th,
  #orcamento_table tbody td {
    padding: 0.5rem;
  }

  .resumo-totais {
    padding: 1rem;
  }
}

/* ======================== CHECKLIST DINÂMICO ======================== */

/* Estilos para o checklist dinâmico */
#checklist_container .table {
  font-size: 0.95rem;
}

#checklist_container table thead {
  background-color: var(--cinza) !important;
  border-top: 2px solid var(--verde-esc);
  border-bottom: 2px solid var(--verde-esc);
}

#checklist_container table thead th {
  color: var(--verde-esc);
  font-weight: 700;
  padding: 1rem 0.75rem;
}

#checklist_container table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease;
}

#checklist_container table tbody tr:hover {
  background-color: rgba(32, 176, 56, 0.05);
}

#checklist_container table tbody td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

#checklist_container table tbody td strong {
  color: var(--verde-esc);
  font-weight: 600;
}

/* Radio buttons do checklist */
#checklist_container .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  border: 2px solid #ddd;
  transition: all 0.2s ease;
}

#checklist_container .form-check-input:hover {
  border-color: var(--verde-esc);
  box-shadow: 0 0 0 0.2rem rgba(32, 176, 56, 0.25);
}

#checklist_container .form-check-input:checked {
  background-color: var(--verde-esc);
  border-color: var(--verde-esc);
}

/* Campo adicional de voltagem para PILHA CMOS */
#checklist_container input[name$="_valor"] {
  max-width: 150px;
  font-size: 0.85rem;
}

/* Dispositivos de armazenamento */
.dispositivo-item {
  border-radius: var(--radius) !important;
  background-color: #f8f9fa !important;
  border: 1px solid rgba(27, 67, 51, 0.1) !important;
  padding: 1rem !important;
  transition: all 0.2s ease;
}

.dispositivo-item:hover {
  background-color: rgba(32, 176, 56, 0.05) !important;
  border-color: var(--verde-esc) !important;
}

.dispositivo-item .form-select,
.dispositivo-item .form-control {
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.dispositivo-item .btn-danger {
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.dispositivo-item .btn-danger:hover {
  transform: scale(1.05);
}

/* Botões de reordenação discretos */
.btn-mover-cima,
.btn-mover-baixo {
  border: none !important;
  background: transparent !important;
  color: #adb5bd !important;
  padding: 0 !important;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-mover-cima:hover,
.btn-mover-baixo:hover {
  color: var(--verde-acento) !important;
  transform: scale(1.2);
}

/* Esconder seta para cima no primeiro item */
.dispositivo-item:first-child .btn-mover-cima {
  visibility: hidden;
  pointer-events: none;
}

/* Esconder seta para baixo no último item */
.dispositivo-item:last-child .btn-mover-baixo {
  visibility: hidden;
  pointer-events: none;
}

/* Input group para capacidade + unidade */
#dispositivos_container .input-group {
  gap: 0;
}

#dispositivos_container .input-group .form-control,
#dispositivos_container .input-group .form-select {
  border-radius: 0;
}

#dispositivos_container .input-group .form-control:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

#dispositivos_container .input-group .form-select:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Grid de 8 colunas para o dashboard (12.5% cada) */
@media (min-width: 992px),
(max-width: 991px) and (orientation: landscape) {
  .col-grid-8 {
    flex: 0 0 auto;
    width: 12.5%;
  }
}

/* Grid de 7 colunas para o dashboard (14.28% cada) */
@media (min-width: 992px),
(max-width: 991px) and (orientation: landscape) {
  .col-grid-7 {
    flex: 0 0 auto;
    width: 7%;
  }
}

/* Responsividade para o checklist */
@media (max-width: 768px) {
  #checklist_container .table {
    font-size: 0.8rem;
  }

  #checklist_container .form-check-input {
    width: 1rem;
    height: 1rem;
  }

  #checklist_container table thead th {
    padding: 0.5rem 0.25rem;
    text-align: center;
  }

  #checklist_container table tbody td {
    padding: 0.75rem 0.25rem;
  }

  .dispositivo-item .row {
    gap: 0.5rem;
  }

  .dispositivo-item .col-md-4,
  .dispositivo-item .col-md-3,
  .dispositivo-item .col-md-1 {
    min-width: 100%;
  }
}

/* Animação de adição de dispositivo */
@keyframes fadeInDevice {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dispositivo-item {
  animation: fadeInDevice 0.3s ease-out;
}

/* Estilo para botão de adicionar dispositivo */
button[onclick="adicionarDispositivo()"] {
  background: var(--verde-esc);
  color: white;
  border: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

button[onclick="adicionarDispositivo()"]:hover {
  background: var(--verde-acento);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* RESPONSIVIDADE MOBILE - DASHBOARD TABELA (APENAS VERTICAL/PORTRAIT) */
@media (max-width: 768px) and (orientation: portrait) {

  /* Ocultar header em mobile */
  #osTable thead {
    display: none !important;
  }

  /* Tabela de OS - Ajustes para mobile */
  #osTable tbody tr {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border: 1px solid #eee !important;
    border-radius: 4px;
  }

  #osTable tbody td {
    font-size: 0.8rem;
    padding: 0.5rem !important;
    flex: 0 0 auto;
  }

  #osTable td[data-label="Código"] {
    flex: 0 0 100%;
    max-width: 100%;
    order: 1;
  }

  #osTable td[data-label="Código"] strong {
    font-size: 0.8rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  #osTable td[data-label="Status"] {
    flex: 0 0 100%;
    max-width: 100%;
    order: 3;
  }

  #osTable td[data-label="Status"] .pill {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    width: 100%;
    text-align: center;
  }

  #osTable td[data-label="Data"] {
    flex: 0 0 auto;
    max-width: 100%;
    font-size: 0.75rem;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 4;
    margin-left: auto;
    text-align: right;
  }

  #osTable td[data-label="Cliente"] {
    flex: 0 0 100%;
    max-width: 100%;
    order: 2;
  }

  #osTable td[data-label="Cliente"] .fw-bold {
    font-size: 0.85rem;
  }

  #osTable td[data-label="Cliente"] .small {
    font-size: 0.65rem;
  }

  #osTable td[data-label="Ações"] {
    flex: 0 0 100%;
    max-width: 100%;
    order: 5;
  }

  #osTable td[data-label="Ações"] .d-flex {
    justify-content: flex-start !important;
  }

  #osTable .px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* Botões de Ação do Dashboard */
.btn-acao-editar {
  background: #0d6efd !important;
  color: #fff !important;
  border: none !important;
}

.btn-acao-editar:hover {
  background: #0b5ed7 !important;
  filter: brightness(1.1);
}

.btn-acao-compartilhar {
  background: #6c757d !important;
  color: #fff !important;
  border: none !important;
}

.btn-acao-compartilhar:hover {
  background: #5c636a !important;
  filter: brightness(1.1);
}

.btn-acao-imprimir {
  background: #198754 !important;
  color: #fff !important;
  border: none !important;
}

.btn-acao-imprimir:hover {
  background: #157347 !important;
  filter: brightness(1.1);
}

.btn-acao-excluir {
  background: #dc3545 !important;
  color: #fff !important;
  border: none !important;
}

.btn-acao-excluir:hover {
  background: #bb2d3b !important;
  filter: brightness(1.1);
}

/* ===== USER AVATAR & PROFILE DROPDOWN ===== */
.user-avatar-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 0.5rem;
}

.user-avatar {
  width: 30px;
  height: 30px;
  background-color: var(--verde-acento) !important;
  border-radius: 50% !important;
  border: 2px #FFF solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  text-decoration: none !important;
}

.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 2px var(--verde-acento) solid;
  background-color: var(--branco) !important;
}

.avatar-initial {
  text-transform: uppercase;
}

.user-profile-dropdown .dropdown-toggle::after {
  display: none;
}

.user-profile-dropdown .dropdown-menu {
  border-radius: 12px;
  padding: 0;
  min-width: 220px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: none;
}

.user-profile-header {
  background-color: #f8f9fa;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #eee;
  border-radius: 12px 12px 0 0;
}

.user-profile-name {
  font-weight: 700;
  color: var(--verde-esc);
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

.user-profile-role {
  font-size: 0.7rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.user-profile-item {
  padding: 0.85rem 1.25rem;
  transition: background-color 0.2s;
  color: #444;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.user-profile-item:hover {
  background-color: rgba(var(--verde-acento-rgb), 0.08);
  color: var(--verde-acento);
}

.user-profile-item.logout {
  color: #dc3545;
  border-top: 1px solid #f1f1f1;
}

.user-profile-item.logout:hover {
  background-color: #fff5f5;
  color: #bd2130;
}

/* --- Responsive UI Improvements (Status: Added) --- */

/* Action Buttons Header Labels */
@media (max-width: 576px) {

  /* Hiding button text on very small screens, keeping only icons */
  .btn-sm .bi+span {
    display: none !important;
  }
}

/* Responsividade de Abas (Mobile vertical) */
@media (max-width: 576px) {
  .nav-tabs .nav-link {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
  }

  .nav-tabs .nav-link .tab-label {
    display: none;
  }

  .nav-tabs .nav-link.active {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .nav-tabs .nav-link.active .tab-label {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
  }

  /* Remove margin from icon when label is hidden */
  .nav-tabs .nav-link:not(.active) i {
    margin-right: 0 !important;
  }

  .nav-tabs .nav-link.active i {
    margin-right: 0 !important;
    /* Managed by margin-left on label */
  }
}

/* Dashboard Cards Ultra-Compact for Landscape Mobile */
@media (max-width: 991px) and (orientation: landscape) {
  .col-grid-7 {
    width: 7.14% !important;
    /* Forces 14 items in one line */
    padding: 0 2px !important;
  }

  .status-card-inner {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .status-card-inner .d-flex {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .status-card-text {
    display: none !important;
  }

  .status-card-inner h5 {
    font-size: 0.75rem !important;
    margin: 0 !important;
  }

  .status-card-inner i {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

}

/* Dashboard Cards Compact for Portrait Mobile */
@media (max-width: 768px) and (orientation: portrait) {
  .col-grid-7 {
    width: 14.28% !important;
    /* Forces 7 items per line (2 rows total) */
    padding: 0 1px !important;
  }

  .status-card-inner {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .status-card-inner .d-flex {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .status-card-text {
    display: none !important;
  }

  .status-card-inner h5 {
    font-size: 0.7rem !important;
    margin: 0 !important;
  }

  .status-card-inner i {
    font-size: 0.85rem !important;
    margin: 0 !important;
  }

  /* Minimize card padding to fit all 7 horizontally */
  .col-grid-7 .caixa {
    padding: 6px 1px !important;
    border-radius: 6px !important;
  }
}