body {
  opacity: 0;
  transition: opacity .4s ease-in-out;
}

@media print {
  body {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #fff;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important
  }

  .invoice-box {
    box-shadow: none;
    border: 0;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0
  }

  .no-print {
    display: none
  }

  .table-bordered th,
  .table-bordered td {
    border: 1px solid #000 !important
  }

  .table {
    border-collapse: collapse !important
  }
}

.invoice-box {
  max-width: 800px;
  margin: auto;
  padding: 30px;
  border: 1px solid #eee;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, .15);
}

.login-body {
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-card {
  border: none;
  border-radius: 1rem;
}

#imageGallery,
#firmaImageGallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.gallery-item {
  position: relative;
  width: 150px;
  height: 150px;
  border: 1px solid #ddd;
  padding: 5px;
  border-radius: 5px;
  cursor: move;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .delete-img-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: red;
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  padding-bottom: 2px;
}

.gallery-item.is-thumbnail {
  border: 3px solid #0d6efd;
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.swal2-container {
  z-index: 10000;
}

.navbar-nav .nav-link {
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  padding: 8px 15px !important;
  margin: 0 2px;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 65px;
  white-space: nowrap;
  font-size: 0.9rem;
  height: 100%;
}

@media (max-width: 991.98px) {
  .navbar-nav {
    width: 100%;
    padding-top: 10px;
  }
  .navbar-nav .nav-item {
    width: 100%;
    margin-bottom: 5px;
  }
  .navbar-nav .nav-link {
    flex-direction: row !important;
    justify-content: flex-start !important;
    min-height: 50px;
    padding: 10px 20px !important;
    width: 100%;
  }
  .navbar-nav .nav-link i {
    width: 25px;
    margin-bottom: 0 !important;
    margin-right: 12px !important;
    text-align: center;
  }
}

.navbar-nav .nav-link i {
  font-size: 1.2rem;
  margin-bottom: 4px;
  margin-right: 0 !important;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(91, 113, 227, .42);
  transform: translateY(-3px);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

/* Dropdown toggle ok işareti için görsel düzeltme */
.navbar .dropdown-toggle::after {
  display: block;
  margin-top: 5px;
  margin-left: 0;
  border-top: .35em solid;
  border-right: .35em solid transparent;
  border-bottom: 0;
  border-left: .35em solid transparent;
}

@media (max-width: 991.98px) {
  .navbar .dropdown-toggle::after {
    margin-top: 0;
    margin-left: auto;
  }
}

.navbar-nav .nav-link.show {
  background-color: rgba(91, 113, 227, .6) !important;
  color: #fff !important;
}

.dropdown-menu {
  animation: fadeInMove .3s ease forwards;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
}

@keyframes fadeInMove {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.select2-container .select2-selection--single {
  height: 31px !important;
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: inherit !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  margin: 0 !important;
  padding-left: 0.5rem !important;
  color: #212529 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__clear {
  line-height: 0 !important;
}

#malzemeEkleForm .select2-container--bootstrap-5 .select2-selection,
#siparisForm .select2-container--bootstrap-5 .select2-selection,
#siparisEkBilgiModal .select2-container--bootstrap-5 .select2-selection {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
}

td.dt-right-body {
  text-align: right !important;
}

#kalemlerTablosu td {
  vertical-align: middle !important;
}

#kalemlerTablosu .select2-container--bootstrap-5 .select2-selection--single {
  height: 31px !important;
  min-height: 31px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  font-size: 0.875rem !important;
}

#kalemlerTablosu .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  padding-left: 0.5rem !important;
  line-height: normal !important;
}

#kalemlerTablosu .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 29px !important;
}

#kalemlerTablosu .form-control,
#kalemlerTablosu .form-select,
#kalemlerTablosu .input-group-text {
  height: 31px !important;
  font-size: 0.875rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* Evrak Listeleme UI */
.evrak-item {
  transition: all 0.2s ease;
  border-left: 4px solid #0d6efd !important;
}

.evrak-item:hover {
  background-color: #f1f7ff !important;
  transform: translateX(5px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.evrak-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropzone {
  transition: all 0.3s ease;
  border: 2px dashed #6c757d !important;
  border-radius: 8px;
  background-color: #f8f9fa;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone:hover {
  border-color: #0d6efd !important;
  background-color: #eef5ff !important;
}

.dropzone .dz-message {
  font-weight: 500;
  color: #6c757d;
  text-align: center;
  margin: 0;
}

.dropzone .dz-message::before {
  content: "\f0ee";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  display: block;
  font-size: 3.5rem;
  margin-bottom: 15px;
  color: #0d6efd;
}

.dropzone .dz-message i {
  display: none;
}

/* Log JSON Blok Tasarımı */
.json-block {
  font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
  background-color: #f8f9fa !important;
  color: #d63384;
  border: 1px solid #dee2e6 !important;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-all;
}

.toggle-json:hover {
  text-decoration: underline !important;
  color: #0b5ed7 !important;
}

.lb-image {
  image-rendering: -webkit-optimize-contrast;
}

/* Tüm Lightbox Görselleri için Sabit Boyut ve Kararlı Navigasyon */
.lb-outerContainer,
.lb-container {
  width: 85vw !important;
  height: 85vh !important;
  max-width: 85vw !important;
  max-height: 85vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

img.lb-image {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Altyazı (Caption) Alanı Sabitleme */
.lb-dataContainer {
  width: 85vw !important;
  max-width: 85vw !important;
  margin: 0 auto !important;
}

.lb-data {
  padding: 0 20px !important;
}


/* DataTable Header Fixes */
.dataTables_wrapper .row:first-child {
  align-items: center;
  margin-bottom: 1rem;
}

.dataTables_filter label, 
.dataTables_length label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
  white-space: nowrap !important;
}

.dataTables_filter input {
  margin-left: 0 !important;
  max-width: 15vw !important;
  min-width: 150px !important;
}


.dt-buttons {
  display: flex !important;
  justify-content: flex-start !important;
  /* gap: 4px !important; */
  flex-wrap: wrap !important;
}

@media (max-width: 767.98px) {
  .dt-buttons {
    justify-content: center !important;
    margin-bottom: 1rem;
  }
  .dataTables_filter label, 
  .dataTables_length label {
    justify-content: center !important;
  }
}