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%;
}

body {
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background-color: #f8f9fa;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ============================================
   MODERN NAVBAR STYLES
   ============================================ */

.navbar-modern {
  background: #ffffff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #e9ecef;
  min-height: 72px;
  position: relative;
  z-index: 1000;
}

.navbar-brand-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  color: #212529 !important;
  font-weight: 700;
  transition: all 0.3s ease;
}

.navbar-brand-modern:hover {
  transform: translateY(-1px);
  color: #667eea !important;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.navbar-brand-modern:hover .brand-icon {
  transform: rotate(5deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #212529;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: #6c757d;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.navbar-toggler-modern {
  border: 1px solid #e9ecef;
  padding: 8px;
  background: transparent;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s ease;
}

@media (max-width: 991px) {
  .navbar-toggler-modern {
    display: flex;
  }
}

.navbar-toggler-modern:hover {
  background: #f8f9fa;
  border-color: #667eea;
}

.navbar-toggler-modern span {
  width: 22px;
  height: 2px;
  background: #495057;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-nav-main {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  width: auto;
  flex-shrink: 0;
}

.nav-item-modern {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-link-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #495057 !important;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  white-space: nowrap;
  margin: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  vertical-align: middle;
  min-width: fit-content;
}

.nav-link-modern i {
  font-size: 16px;
  color: #6c757d;
  transition: all 0.2s ease;
}

.nav-link-modern:hover:not(.active) {
  background: #f8f9fa;
  color: #667eea !important;
}

.nav-link-modern:hover:not(.active) i {
  color: #667eea;
  transform: scale(1.1);
}

.nav-link-modern.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  padding: 10px 16px !important;
  margin: 0 !important;
  box-sizing: border-box;
  transform: none !important;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  float: none !important;
  clear: none !important;
  flex-shrink: 0;
  display: inline-flex !important;
  transition: none !important;
  will-change: auto;
  min-width: fit-content;
  max-width: none;
}

.nav-link-modern.active i {
  color: white;
  transform: none !important;
}

.nav-link-modern.active::after {
  display: none;
}

.nav-link-modern.dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.5em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
  color: #6c757d;
  transition: transform 0.3s ease;
}

.nav-link-modern.active.dropdown-toggle::after {
  color: white;
}

.nav-link-modern.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.dropdown-menu-modern {
  background: white !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  padding: 8px !important;
  margin-top: 8px !important;
  min-width: 200px;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item-modern {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  color: #495057 !important;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  border: none !important;
}

.dropdown-item-modern i {
  font-size: 16px;
  color: #667eea;
  width: 20px;
  text-align: center;
}

.dropdown-item-modern:hover,
.dropdown-item-modern:focus {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  transform: translateX(4px);
}

.dropdown-item-modern:hover i,
.dropdown-item-modern:focus i {
  color: white;
}

.dropdown-item-modern.text-danger {
  color: #dc3545 !important;
}

.dropdown-item-modern.text-danger:hover,
.dropdown-item-modern.text-danger:focus {
  background: #dc3545 !important;
  color: white !important;
}

.dropdown-divider-modern {
  margin: 8px 0;
  border-color: #e9ecef;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.company-selector-wrapper {
  position: relative;
}

.company-selector-modern {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 8px 40px 8px 16px !important;
  color: #495057 !important;
  font-size: 14px;
  font-weight: 500;
  min-width: 220px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: auto;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.company-selector-modern:focus {
  background: #ffffff !important;
  border-color: #667eea !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  color: #212529 !important;
}

.company-selector-modern option {
  background: white !important;
  color: #495057 !important;
  padding: 10px;
}

.company-selector-modern::-ms-expand {
  display: none;
}

.project-selector-wrapper {
  position: relative;
}

.project-selector-modern {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 8px 40px 8px 16px !important;
  color: #495057 !important;
  font-size: 14px;
  font-weight: 500;
  min-width: 220px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: auto;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.project-selector-modern:focus {
  background: #ffffff !important;
  border-color: #667eea !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  color: #212529 !important;
}

.project-selector-modern option {
  background: white !important;
  color: #495057 !important;
  padding: 10px;
}

.project-selector-modern::-ms-expand {
  display: none;
}

.user-menu-wrapper {
  position: relative;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #667eea;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #e9ecef;
}

.user-avatar:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.05);
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.user-dropdown {
  min-width: 240px;
}

.user-info {
  padding: 12px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 4px;
}

.user-name {
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.user-role {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 400;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  color: white !important;
}

.btn-login:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 991px) {
  .navbar-nav-main {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 16px;
  }

  .nav-link-modern {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .navbar-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 16px;
    gap: 12px;
  }

  .company-selector-modern {
    width: 100%;
  }

  .project-selector-modern {
    width: 100%;
  }

  .user-menu-wrapper {
    width: 100%;
  }

  .user-avatar {
    width: 100%;
    height: 50px;
    border-radius: 10px;
  }

  .dropdown-menu-modern {
    position: static !important;
    transform: none !important;
    width: 100%;
    margin-top: 8px;
  }
}

/* Active state for current page */
.nav-link-modern[aria-current="page"],
.nav-link-modern.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-weight: 600;
}

.nav-link-modern[aria-current="page"] i,
.nav-link-modern.active i {
  color: white;
}

/* ============================================
   SELECT2 CUSTOM STYLES - MODERN DESIGN
   ============================================ */

/* Select2 container - genişlik kontrolü */
.select2-container {
  max-width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Select2 selection box - modern tasarım */
.select2-container--bootstrap-5 .select2-selection {
  height: 42px !important;
  min-height: 42px !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.select2-container--bootstrap-5 .select2-selection:hover {
  border-color: #667eea !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

/* Select2 selection içindeki text alanı */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 40px !important;
  padding-left: 14px !important;
  padding-right: 60px !important; /* Clear button ve arrow için yer */
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  color: #2d3748 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* Select2 placeholder */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: #a0aec0 !important;
  font-weight: 400 !important;
}

/* Select2 clear button (çarpı işareti) - modern tasarım */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
  position: absolute !important;
  right: 38px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  line-height: 22px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #718096 !important;
  cursor: pointer !important;
  z-index: 15 !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: #f7fafc !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear:hover {
  color: #e53e3e !important;
  background-color: #fed7d7 !important;
  transform: translateY(-50%) scale(1.1) !important;
}

/* Select2 dropdown arrow - modern tasarım */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 12px !important;
  width: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow b {
  border-color: #667eea transparent transparent transparent !important;
  border-width: 6px 5px 0 5px !important;
  margin-top: 0 !important;
  transition: transform 0.3s ease !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection--single .select2-selection__arrow b {
  transform: rotate(180deg) !important;
}

/* Select2 dropdown menü - modern tasarım */
.select2-dropdown {
  min-width: 250px !important;
  max-width: 600px !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
  margin-top: 4px !important;
  overflow: hidden !important;
  z-index: 9999 !important;
}

/* Dropdown genişliğini seçim kutusunun genişliğine göre ayarla - ekranın tamamını kaplamasın */
.select2-container--bootstrap-5 .select2-dropdown {
  width: auto !important;
  min-width: 100% !important; /* Seçim kutusunun en az genişliği kadar */
  max-width: 600px !important; /* Maksimum genişlik sınırı */
}

/* Dropdown açıldığında genişliğini container'a göre ayarla */
.select2-container--bootstrap-5.select2-container--open .select2-dropdown {
  width: auto !important;
  min-width: 100% !important;
  max-width: 600px !important;
}

/* Select2 results container */
.select2-results {
  max-height: 320px !important;
  overflow-y: auto !important;
  padding: 4px 0 !important;
}

/* Custom scrollbar for results */
.select2-results::-webkit-scrollbar {
  width: 6px;
}

.select2-results::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.select2-results::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.select2-results::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Select2 results option - modern tasarım */
.select2-results__option {
  padding: 12px 16px !important;
  line-height: 1.5 !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  color: #2d3748 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  margin: 2px 4px !important;
  border-radius: 6px !important;
}

.select2-results__option:hover {
  background-color: #f7fafc !important;
  color: #667eea !important;
}

.select2-results__option--highlighted {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.select2-results__option--selected {
  background-color: #edf2f7 !important;
  color: #667eea !important;
  font-weight: 600 !important;
}

.select2-results__option--selected.select2-results__option--highlighted {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #ffffff !important;
}

/* Select2 search field - modern tasarım */
.select2-search--dropdown {
  padding: 12px !important;
  background-color: #f7fafc !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.select2-search--dropdown .select2-search__field {
  padding: 10px 14px !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 6px !important;
  width: 100% !important;
  height: 42px !important;
  font-size: 14px !important;
  color: #2d3748 !important;
  background-color: #ffffff !important;
  transition: all 0.3s ease !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: #667eea !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.select2-search--dropdown .select2-search__field::placeholder {
  color: #a0aec0 !important;
}

/* Select2 focus state - modern tasarım */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
  background-color: #ffffff !important;
}

/* Select2 disabled state */
.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
  background-color: #f7fafc !important;
  border-color: #e0e0e0 !important;
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection--single .select2-selection__rendered {
  color: #a0aec0 !important;
}

/* Select2 multiple selection - modern tasarım */
.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: 42px !important;
  height: auto !important;
  padding: 4px 4px 0 4px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  padding: 4px 8px !important;
  padding-right: 40px !important; /* Arrow için yer */
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  color: #ffffff !important;
  margin-right: 8px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  opacity: 0.9 !important;
  transition: opacity 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
  opacity: 1 !important;
  color: #fed7d7 !important;
}

/* Select2 loading state */
.select2-results__option--loading {
  color: #667eea !important;
  font-style: italic !important;
}

/* Select2 no results message */
.select2-results__message {
  padding: 16px !important;
  color: #718096 !important;
  font-size: 14px !important;
  text-align: center !important;
  font-style: italic !important;
}