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 {
  background: #181c24;
  color: #f1f1f1;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/gemi-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.navbar {
  background: #232837 !important;
  border-bottom: 1px solid #222;
}

.navbar-brand {
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff !important;
}

.dashboard-sidebar {
  background: #232837 !important;
  min-height: 100vh;
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
  padding-top: 0;
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  border-bottom: 1px solid #232837;
}

.sidebar-userbox {
  background: #232837;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #181c24;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007bff;
  font-size: 1.7rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.sidebar-username {
  font-weight: 600;
  color: #fff;
  font-size: 1.08rem;
}

.sidebar-role {
  font-size: 0.95rem;
  color: #bfc9d1;
}

.sidebar-divider {
  border-top: 1px solid #343a40;
  margin: 0.5rem 0;
}

.sidebar-section {
  color: #bfc9d1;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.dashboard-sidebar .nav-link {
  color: #bfc9d1;
  font-size: 1.08rem;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  padding: 0.7rem 1rem;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.dashboard-sidebar .nav-link.active, .dashboard-sidebar .nav-link:hover {
  background: #343a40;
  color: #fff;
}

.dashboard-sidebar .nav-link.text-danger {
  color: #e74c3c !important;
}

.dashboard-sidebar .nav-link i {
  margin-right: 10px;
  font-size: 1.15rem;
}

@media (max-width: 991.98px) {
  .dashboard-sidebar {
    min-height: unset;
    padding-bottom: 1rem;
  }
  .sidebar-title, .sidebar-userbox, .sidebar-section {
    text-align: center;
  }
}

main {
  background: #181c24;
  min-height: 100vh;
  padding: 2.5rem 2rem 2rem 2rem;
  color: #f1f1f1;
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/gemi-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

main > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 991.98px) {
  .sidebar {
    min-height: unset;
    padding-bottom: 1rem;
  }
  main {
    padding: 1.5rem 0.5rem;
  }
}

.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;
}

.bg-primary {
  background: linear-gradient(135deg, #232837 60%, #1a1d29 100%) !important;
  color: #fff !important;
}

.input-group-text, .form-control {
  background: #232837 !important;
  color: #f1f1f1 !important;
  border: 1px solid #444 !important;
}

.form-control:focus {
  background: #232837 !important;
  color: #fff !important;
  border-color: #007bff !important;
}

.btn-primary {
  background: linear-gradient(90deg, #007bff 60%, #0056b3 100%);
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #0056b3 60%, #007bff 100%);
}

.custom-login-row {
  max-width: 950px;
  min-height: 600px;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
  border-radius: 24px;
  overflow: hidden;
  background: #232837 !important;
  position: relative;
}

.custom-login-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/gemi-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

.custom-login-row > * {
  position: relative;
  z-index: 1;
}

.custom-col {
  min-height: 600px;
}

@media (max-width: 991.98px) {
  .custom-login-row {
    flex-direction: column !important;
    min-height: unset !important;
  }
  .custom-col {
    min-height: 250px !important;
    padding: 2rem 1rem !important;
  }
}

.bg-white {
  background: #232837 !important;
  color: #f1f1f1 !important;
}

.dashboard-header {
    height: 64px;
    background: linear-gradient(90deg, #232837 80%, #232837 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.dashboard-title {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-left: 8px;
}
.user-greeting {
    font-size: 1.08rem;
    color: #bfc9d1;
}
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #232837;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 1.7rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.dashboard-header .btn-danger {
    font-size: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(231,76,60,0.10);
    transition: background 0.2s;
}
.dashboard-header .btn-danger:hover {
    background: #c0392b;
}
@media (max-width: 991.98px) {
    .dashboard-header {
        flex-direction: column;
        height: auto;
        padding: 1rem 0.5rem;
        text-align: center;
    }
    .dashboard-title {
        margin-left: 0;
    }
    .user-greeting, .user-avatar, .dashboard-header .btn-danger {
        margin: 0.5rem 0 !important;
    }
}

.dashboard-content {
    background: rgba(35, 40, 55, 0.9);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}
@media (max-width: 991.98px) {
    .dashboard-content {
        margin: 0.5rem 0.2rem;
        padding: 1rem 0.2rem;
        border-radius: 10px;
    }
}

.card, .stat-card {
    background: #232837 !important;
    color: #f1f1f1;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none;
}
.card label, .stat-card label {
    color: #f1f1f1;
    font-weight: 500;
    font-size: 1.05rem;
}
.card .form-control, .card .form-control-file, .card textarea {
    background: #181c24;
    color: #f1f1f1;
    border: 1px solid #444;
    border-radius: 8px;
}
.card .form-control:focus, .card textarea:focus {
    background: #232837;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 0.1rem #007bff33;
}
.card .form-control::placeholder, .card textarea::placeholder {
    color: #bfc9d1;
    opacity: 1;
}
.card .form-control-file {
    color: #f1f1f1;
}
.card input[type="file"]::-webkit-file-upload-button {
    background: #232837;
    color: #f1f1f1;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    cursor: pointer;
}
.card input[type="file"]::file-selector-button {
    background: #232837;
    color: #f1f1f1;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    cursor: pointer;
}
.stat-card {
    background: #232837 !important;
    color: #fff;
}
.stat-title {
    color: #fff;
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}
.stat-value {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
#topQrs li {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}
#topQrs .badge {
    background: #007bff;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 0.5rem;
}
.card h6, .card .mb-3 {
    color: #fff !important;
    font-weight: 600;
}

/* Modal backdrop düzeltmeleri */
.modal-backdrop {
    z-index: 1040 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal {
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: 1051 !important;
    position: relative;
}

.modal-content {
    z-index: 1052 !important;
    position: relative;
}

/* Modal açılma animasyonunu iyileştir */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Modal backdrop animasyonu */
.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
}

/* Modal kapatıldığında backdrop'un tamamen kaldırılması */
.modal-backdrop.removing {
    opacity: 0 !important;
    transition: opacity 0.15s linear;
}

/* Modal açıkken body'nin scroll'unu engelle */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* Modal kapatıldıktan sonra body'nin normal haline dönmesi */
body:not(.modal-open) {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* Çoklu backdrop'ları engelle - daha agresif */
.modal-backdrop + .modal-backdrop,
.modal-backdrop ~ .modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* İkinci ve sonraki backdrop'ları tamamen gizle */
.modal-backdrop:nth-child(n+2) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Modal içeriğinin her zaman tıklanabilir olması */
.modal-content {
    pointer-events: auto !important;
}

/* Modal backdrop'un sadece modal dışına tıklamayı engellemesi */
.modal-backdrop {
    pointer-events: auto !important;
}

/* Bootstrap'in otomatik backdrop oluşturmasını engelle */
.modal-backdrop.fade.show:not(:first-child) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Tablo stilleri - font rengi düzeltmeleri */
.table {
    color: #f1f1f1 !important;
    background-color: rgba(35, 40, 55, 0.9) !important;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #343a40 !important;
    color: #fff !important;
    border-color: #495057 !important;
    font-weight: 600;
    padding: 12px 15px;
}

.table td {
    color: #f1f1f1 !important;
    border-color: #495057 !important;
    padding: 12px 15px;
    vertical-align: middle;
}

.table tbody tr {
    background-color: rgba(35, 40, 55, 0.7) !important;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(52, 58, 64, 0.8) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(35, 40, 55, 0.5) !important;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(52, 58, 64, 0.7) !important;
}

/* DataTables stilleri */
.dataTables_wrapper {
    color: #f1f1f1 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #f1f1f1 !important;
    margin: 15px 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #232837 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
    border-radius: 4px;
    padding: 5px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #343a40 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #495057 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
}

/* Tablo responsive stilleri */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* Kullanıcı Yönetimi Sayfası Özel Stilleri */
.container-fluid {
    color: #f1f1f1 !important;
}

.container-fluid h1,
.container-fluid h2,
.container-fluid h3,
.container-fluid h4,
.container-fluid h5,
.container-fluid h6 {
    color: #fff !important;
}

.container-fluid .text-gray-800 {
    color: #fff !important;
}

/* Card stilleri */
.card {
    background-color: rgba(35, 40, 55, 0.9) !important;
    border: 1px solid #495057 !important;
    color: #f1f1f1 !important;
}

.card-header {
    background-color: #343a40 !important;
    border-bottom: 1px solid #495057 !important;
    color: #fff !important;
}

.card-header h6 {
    color: #fff !important;
}

.card-body {
    color: #f1f1f1 !important;
}

/* Alert stilleri */
.alert {
    background-color: rgba(35, 40, 55, 0.9) !important;
    border: 1px solid #495057 !important;
    color: #f1f1f1 !important;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2) !important;
    border-color: #28a745 !important;
    color: #d4edda !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2) !important;
    border-color: #dc3545 !important;
    color: #f8d7da !important;
}

/* Button stilleri */
.btn-outline-primary {
    color: #007bff !important;
    border-color: #007bff !important;
}

.btn-outline-primary:hover {
    background-color: #007bff !important;
    color: #fff !important;
}

.btn-outline-warning {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.btn-outline-warning:hover {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* Badge stilleri */
.badge.bg-success {
    background-color: #28a745 !important;
    color: #fff !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* DataTables özel stilleri */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #f1f1f1 !important;
    margin: 15px 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #232837 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
    border-radius: 4px;
    padding: 5px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #343a40 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #495057 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
}

/* Form stilleri */
.form-control {
    background-color: #232837 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
}

.form-control:focus {
    background-color: #2c3136 !important;
    color: #fff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.form-label {
    color: #f1f1f1 !important;
}

/* Modal stilleri */
.modal-content {
    background-color: #232837 !important;
    color: #f1f1f1 !important;
    border: 1px solid #495057 !important;
}

.modal-header {
    background-color: #343a40 !important;
    border-bottom: 1px solid #495057 !important;
    color: #fff !important;
}

.modal-title {
    color: #fff !important;
}

.modal-body {
    color: #f1f1f1 !important;
}

.modal-footer {
    background-color: #343a40 !important;
    border-top: 1px solid #495057 !important;
}