html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.form-control {
  height: 62px;
  border: 1px solid #464444;
  background: #E7E6E7;
  font-weight: 500;
  font-size: 18px;
  color: #000;
}
.btn-primary {
  height: 59px;
  border: none;
  padding: 0 32px;
  background-color: #FF4C0A;
  font-weight: 500;
  font-size: 16px;
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border: none;
  background-color: #FF4C0A;
  opacity: 0.8;
}
.btn-primary:disabled {
  opacity: .3;
  background-color: #B1AFB0;
  color: #5B5859;
}

.header-menu-link {
  gap: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  border-radius: 100px;
  background-color: #FFA46D;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  color: #460804;
}
.header-menu-link.dropdown-toggle::after {
  display: none;
}
a.header-menu-link:hover {
  opacity: 0.8;
  color: #460804;
}

.sidebar-menu-link {
  gap: 8px;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 12px;
  background: #FFFFFF33;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  color: #fff;
}
a.sidebar-menu-link:hover {
  opacity: 0.8;
  color: #fff;
}
.sidebar-menu-link.active {
  background-color: #FFC9A5;
  color: #272525;
}
.sidebar-menu-link.active:hover {
  color: #272525;
}

.breadcrumb {
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}
.breadcrumb .btn {
  display: flex;
  padding: 0;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #E7E6E7;
  border-radius: 100px;
  color: #5B5859;
}
.breadcrumb-item {
  font-weight: 500;
  font-size: 16px;
  color: #272525;
}

.breadcrumb-item::before {
  display: none;
}


.custom-table {
  width: 100%;
  margin: 32px 0;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.custom-table th,
.custom-table td {
  line-height: 13px;
  text-align: left;
  padding: 16px 20px 16px 23px;
  border-bottom: 1px solid #E5E5E5;
}

.custom-table th {
  border-top: 1px solid #e5e5e5;
}

.custom-table th:first-child,
.custom-table td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  border-left: 1px solid #e5e5e5;
}

.custom-table th:last-child,
.custom-table td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-right: 1px solid #e5e5e5;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr.selected {
  background-color: #FFC9A5;
}

.custom-table tr.selected td:first-child {
  border-left: 4px solid #FF4C0A;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 16px 20px;
}

.custom-table tr.selected td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.custom-table tbody tr {
  transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
  background-color: #f8f9fa;
}

.custom-table tbody tr.selected:hover {
  background-color: #FFC9A5;
}

.custom-checkbox {
  height: 24px;
  position: relative;
  display: inline-block;
}

.custom-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox-label {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-block;
  background-color: white;
  border: 1px solid #D1D0D1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-checkbox-input:checked + .custom-checkbox-label {
  background-color: #FF7232;
  border-color: #FF7232;
}

.custom-checkbox-input:checked + .custom-checkbox-label:after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 8px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox-label:hover {
  border-color: #FF7232;
  transform: scale(1.02);
}

.icon-folder {
  color: #FF4C0A;
  margin-right: 6px;
}

.alert-danger {
  background-color: #DA0303;
  font-weight: 500;
  font-size: 16px;
  color: #FFE9E9;
}

.page-title {
  margin: 32px 0 32px 23px;
  font-weight: 500;
  font-size: 20px;
  color: #272525;
}

.form-check {
  padding-left: 23px;
  margin-bottom: 32px;
}
.form-check-label {
  margin-left: 8px;
}

.print-settings {
  max-width: 473px;
  margin-left: 32px;
  height: 100%;
}

.print-settings .title {
  margin: 0 0 32px;
  font-weight: 500;
  font-size: 16px;
  color: #272525;
}

.print-settings-form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.print-settings-form .form-control {
  height: 48px;
}

.print-settings-form label {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 14px;
  color: #272525;
}

.select-wrapper {
  position: relative;
}
.select-wrapper i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #272525;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
}

.spinner-border {
  border-width: 15px !important;
  color: #FF4C0A !important;
}

.loading-text {
  text-align: center;
}

.loading-text h4 {
  margin: 0 0 40px 0;
  font-weight: 500;
  font-size: 32px;
  color: #fff;
}

.loading-text p {
  margin: 0;
  font-weight: 500;
  font-size: 24px;
  color: #fff;
}

/* Sticky Table Header */
.table-container {
  position: relative;
  max-height: 500px;
  overflow-y: auto;
  border-radius: 8px;
  background-color: white;
}

.table-container .custom-table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  border-radius: 0;
  width: 100%;
  overflow: visible;
}

.table-container .custom-table thead {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f8f9fa;
  display: table-header-group;
}

.table-container .custom-table thead th {
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #E5E5E5 !important;
  font-weight: 600;
  color: #272525;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: table-cell;
}

/* Fallback para navegadores que não suportam sticky */
@supports not (position: sticky) {
  .table-container .custom-table thead {
    position: relative;
  }
  
  .table-container .custom-table thead th {
    position: relative;
  }
}