:root {
  --bg-color: #183253;
  --bg-imageBg: url("../../images/girisBg_koyuMavi.svg");
  --bg-textColor: #ffffff;
  --bg-formBgColor: #8d9fb5;

  background-color: #ffffff;

  /* width */
  ::-webkit-scrollbar {
    width: 10px;
    height: 8px;
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: #183253;
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: #8dadd8;
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: #183253;
  }

  ::-webkit-scrollbar-corner {
    background: #183253;
  }
}

.svg-inline--fa.fa-w-18 {
  width: 12px;
}

/* ================== YENİ HEADER STİLLERİ ================== */
/* ================== YENİ HEADER STİLLERİ ================== */
.header {
  height: 40px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #183253 0%, #2a4d75 100%);
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1050; /* Sidebar'ın üzerinde */
  transition: all 0.3s ease-in-out;
}

/* Dropdown okunu gizle */
.header .dropdown-toggle::after {
  display: none !important;
}

/* Mobil görünüm için header ayarı */
@media (max-width: 768px) {
  .header {
    left: 0;
    width: 100%;
  }
}

/* ================== YENİ SIDEBAR STİLLERİ ================== */
.sidebar-wrapper {
  position: fixed;
  top: 40px; /* Header yüksekliği */
  left: 0;
  width: 220px;
  height: 100%;
  background: var(--bg-color);
  overflow-x: hidden;
  overflow-y: auto;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}


#sidebarMenu {
  padding: 0 5px;
}

.sidebar-link {
  color: #b8c7ce !important;
  padding: 12px 15px !important;
  margin: 2px 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex !important;
  align-items: center;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #375d81 0%, #4a7ba7 100%);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(55, 93, 129, 0.4);
}

.sidebar-link i {
  width: 24px;
  text-align: center;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
  .sidebar-wrapper {
    width: 60px;
  }
  
  .sidebar-wrapper .d-none.d-sm-inline {
    display: none !important;
  }
  
  .sidebar-link {
    justify-content: center;
    padding: 15px 10px !important;
  }
  
  .sidebar-link i {
    margin: 0;
  }
  
  .sidebar-brand {
    justify-content: center;
    padding: 0;
  }
  
  .sidebar-logo {
    margin-right: 0;
  }
  
  #content {
    width: calc(100% - 60px) !important;
    left: 60px !important;
  }
}
/* ================== YENİ SIDEBAR STİLLERİ SON ================== */

html,
body {
  height: 100%;
  overflow: hidden;
  margin: 0;
}

#content {
  width: calc(100% - 220px);
  margin-top: 40px; /* Header yüksekliği */
  height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0px;
  padding-right: 10px;
  padding-bottom: 10px;
  padding-left: 10px;
  background-color: #ffffff;
  position: relative;
  left: 220px;
  transition: all 0.3s ease-in-out;
}

.table td,
.table th {
  word-break: break-word;
  white-space: normal;
  padding: 3px;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
  align-content: center;
}

th {
  text-align: inherit;
}

.bootstrap-table .fixed-table-container .table thead th .sortable {
  cursor: pointer;
  background-position: right;
  background-repeat: no-repeat;
}

.bootstrap-table .fixed-table-container .table thead th .th-inner {
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label {
  color: #115ba2;
  font-weight: 600;
  display: inline-block;
  margin-top: 6px;
  margin-bottom: 3px;
}

.form-control {
  display: block;
  width: 100%;
  height: 38px;
  padding-left: 3px;
  padding-top: 0px;
  font-size: 16px;
  color: #000000;
  background-color: #f9f9f9;
  background-clip: padding-box;
  border: 1px solid #eaeaea;
  border-radius: 5px;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.modal-content {
  border-radius: 11px;
}

.modal-footer {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  background-color: #375d81;
}

.modal-header {
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  color: white;
  background-color: #375d81;
}

.close {
  color: #ffffff;
  opacity: 1;
}

#addKatmanBtn,
#addDuyuruBtn,
#addUserBtn,
#addServisBtn {
  top: 56px;
  position: absolute;
  z-index: 50;
}

.modal-dialog {
  max-width: 800px;
}

.oturum_kapat {
  position: absolute;
  top: 4px;
  right: 6px;
  height: 30px;
  width: 30px;
  background-color: transparent;
  border: none;
  border-radius: 10%;
}

.oturum_kapat:hover {
  background-color: var(--bg-activebuttonbgcolor);
  cursor: pointer;
  border: none;
}

.oturum_kapat img {
  top: 3px;
  padding: 0px;
  cursor: pointer;
  position: absolute;
  height: 27px;
  width: 32px;
  z-index: 5;
}

#username-display {
  cursor: default;
  position: absolute;
  right: 24px;
  margin-top: 5px;
  height: 23px;
  width: max-content;
  color: var(--text-color);
  box-shadow: 0px 0px 2px #808080;
  border: 0px solid #000000;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  background-color: #369;
  padding: 4px;
  z-index: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12pt;
  text-align: center;
  outline: 0px solid #000000;
  line-height: 13px;
}

.notopen {
  left: 0px;
}

.menubutton {
  outline: none;
  margin-bottom: 0px;
  margin-top: 5px;
  margin-left: 5px;
  margin-right: 5px;
  text-align: left;
  width: calc(100% - 10px);
  height: 35px;
  background-color: #c4d7ed;
  border: 1px solid black;
  border-radius: 5px 5px 5px 5px;
}

.menubutton:hover {
  outline: none;
  margin-bottom: 0px;
  margin-top: 5px;
  margin-left: 5px;
  margin-right: 5px;
  text-align: left;
  width: calc(100% - 10px);
  height: 35px;
  background-color: #557491;
  border: 1px solid black;
  border-radius: 5px 5px 5px 5px;
}

.sliderbutton {
  outline: none;
  text-align: left;
  width: calc(100% - 10px);
  height: 100%;
  background-color: #1d4163;
  border-right: 1px solid black;
  border-left: none;
  border-bottom: none;
  border-top: none;
}

.sliderbutton:hover {
  outline: none;
  text-align: left;
  width: calc(100% - 10px);
  height: 100%;
  background-color: #627c94;
  border-right: 1px solid black;
  border-left: none;
  border-bottom: none;
  border-top: none;
}

button:focus {
  outline: 0px;
}

#manuloading {
  position: fixed;
  top: 0px;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-image: url("../../images/girisBg.svg");
  z-index: 100000 !important;
}

#monuloading_text {
  position: relative;
  text-align: center;
  top: 49%;
  z-index: 1000;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

#monuloading_title_text {
  position: relative;
  text-align: center;
  top: 40%;
  z-index: 1000;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
}

#monuloading_logo {
  position: fixed;
  top: 30%;
  left: 50%;
  /* bring your own prefixes */
  transform: translate(-50%, -50%);
}

.loader {
  top: 50%;
  margin: auto;
  width: 300px;
  height: 20px;
  border-radius: 20px;
  color: #e6e5f0;
  border: 2px solid;
  position: relative;
  z-index: 1001;
}

.loader::before {
  content: "";
  position: absolute;
  margin: 2px;
  inset: 0 100% 0 0;
  border-radius: inherit;
  background: currentColor;
  animation: load 1.1s;
}

@keyframes load {
  100% {
    inset: 0;
  }
}

@keyframes cssAnimation {
  to {
    width: 0;
    height: 0;
    overflow: hidden;
  }
}

@-webkit-keyframes cssAnimation {
  to {
    width: 0;
    height: 0;
    visibility: hidden;
  }
}

.form-group {
  transition: all 0.3s ease;
  margin-bottom: 0px;
}

/* Gizli elemanlar için ek stil */
.form-group[style*="display: none"] {
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

body {
  line-height: 1.11;
}

input {
  line-height: 1;
}

/* İşlemler Kolonu Stilleri */
.actions-col {
  width: 100px !important;
  min-width: 100px !important;
  text-align: center;
}

.action-buttons {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
}

.action-buttons .btn {
  margin: 0px 2px !important;
  padding: 0px 4px !important;
}

/* Sürükleme tutamacı stili */
.drag-handle {
  padding: 4px 8px;
  color: #6c757d;
  font-size: 14px;
  cursor: grab !important;
  user-select: none;
}

.drag-handle:hover {
  color: #007bff;
}

.drag-handle:active {
  cursor: grabbing !important;
}

/* Öznitelik tablosu sürükleme tutamacı stili */
.attr-drag-handle {
  padding: 4px 8px;
  color: #6c757d;
  font-size: 14px;
  cursor: grab !important;
  user-select: none;
}

.attr-drag-handle:hover {
  color: #007bff;
}

.attr-drag-handle:active {
  cursor: grabbing !important;
}


/* SortableJS sürükleme stilleri */
.sortable-ghost {
  opacity: 0.4;
  background-color: #e3f2fd !important;
}

.sortable-chosen {
  background-color: #bbdefb !important;
}

.sortable-drag {
  background-color: #fff !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Simge Kolonu Stili */
.simge-col {
  width: 90px !important;
  text-align: center;
}

/* Renk Kolonu Stili */
.renk-col {
  width: 90px !important;
  text-align: center;
}

/* Nested Modal Z-Index Fix */
#authLayersModal,
#authLayersAddModal {
  z-index: 1060 !important; /* Bootstrap modal z-index is 1050 usually */
}

/* Toast Notification (Panel Style) */
#panel-toast-container {
  position: fixed;
  top: 42px;
  right: 2px;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-toast {
  min-width: 300px;
  max-width: 400px;
  background-color: #333;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 14px;
}

.panel-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.panel-toast.info {
  background-color: #17a2b8; /* Bootstrap Info */
  border-left: 5px solid #117a8b;
}

.panel-toast.success {
  background-color: #28a745; /* Bootstrap Success */
  border-left: 5px solid #1e7e34;
}

.panel-toast.error {
  background-color: #dc3545; /* Bootstrap Danger */
  border-left: 5px solid #bd2130;
}

.panel-toast.warning {
  background-color: #ffc107; /* Bootstrap Warning */
  color: #333;
  border-left: 5px solid #d39e00;
}

.panel-toast-close {
  background: none;
  border: none;
  color: inherit;
  margin-left: 15px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}

.panel-toast-close:hover {
  opacity: 1;
}

/* Servis Seçilmeden Disabled Alan Stilleri */
.disabled-field {
  opacity: 0.6;
  cursor: not-allowed !important;
  background-color: #e9ecef !important;
}

.disabled-field:hover {
  cursor: not-allowed !important;
}

/* Servis Uyarısı */
#editServisWarning,
#addServisWarning {
  margin-bottom: 15px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disabled Switch Stilleri - Görünümü korur ama tıklanamaz */
.switch-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed !important;
}

.switch-disabled .custom-control-label {
  cursor: not-allowed !important;
  color: #6c757d;
}

/* Switch'in toggle kısmını gri yap */
.switch-disabled .custom-control-label::before {
  background-color: #adb5bd !important;
  border-color: #adb5bd !important;
}

.switch-disabled .custom-control-label::after {
  background-color: #fff !important;
}

/* Checked durumda da gri görünsün */
.switch-disabled .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

/* Modal Loading Overlay Stilleri */
.modal-loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  background-color: rgba(255, 255, 255, 0.95);
}

.modal-loading-spinner {
  text-align: center;
  color: #375d81;
}

.modal-loading-spinner i {
  color: #375d81;
}

.modal-loading-spinner p {
  margin-top: 15px;
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* Loading animasyonu fade out */
.modal-loading-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}
