/* ========================================
   Belediye İş Takip - Header Navbar Layout
   Poppins Font • Compact UI • Top Nav
   ========================================*/

/* --- Poppins Font --- */
body,
.btn,
.form-control,
.form-select,
.nav-link,
.dropdown-item,
.badge,
.alert,
.card,
.table,
input,
select,
textarea {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* --- Modern Font Sizes --- */
html {
  font-size: 14.5px;
}

body {
  font-size: 0.935rem;
}

h1,
.h1 {
  font-size: 1.5rem;
}

h2,
.h2 {
  font-size: 1.3rem;
}

h3,
.h3 {
  font-size: 1.15rem;
}

h4,
.h4 {
  font-size: 1.05rem;
}

h5,
.h5 {
  font-size: 0.95rem;
}

h6,
.h6 {
  font-size: 0.88rem;
}

.form-control,
.form-select {
  font-size: 0.9rem;
}

.btn {
  font-size: 0.875rem;
}

.btn-sm {
  font-size: 0.8rem;
}

.table {
  font-size: 0.875rem;
}

.badge {
  font-size: 0.75em;
}

.small,
small {
  font-size: 0.835rem;
}

label,
.form-label {
  font-size: 0.875rem;
}

.dropdown-item {
  font-size: 0.875rem;
}

.breadcrumb {
  font-size: 0.875rem;
}

.alert {
  font-size: 0.875rem;
  padding: 0.6rem 1rem;
}

.alert-dismissible .btn-close {
  padding: 0.8rem 1rem;
}

.card-title {
  font-size: 1rem;
}

.card-body {
  font-size: 0.9rem;
}

/* --- Layout --- */
body {
  min-height: 100vh;
  background-color: #f5f5f7;
  overflow-x: hidden;
}

[data-bs-theme="dark"] body {
  background-color: #121212;
}

/* ========================================
   Site Header (Navbar + Page Header Bar)
   ========================================*/
.site-header {
  z-index: 1030;
}

.navbar {
  font-size: 0.875rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: var(--bs-body-bg) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.navbar-brand-icon {
  width: 32px;
  height: 32px;
  background: #212529;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
}

[data-bs-theme="dark"] .navbar-brand-icon {
  background: #f8f9fa;
  color: #212529;
}

[data-bs-theme="dark"] .app-logo {
  filter: brightness(0) invert(1);
}

/* Loading Overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bs-body-bg, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loadingOverlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loading-logo {
  max-height: 56px;
  animation: loadingPulse 1.8s ease-in-out infinite;
}

.loading-icon {
  font-size: 2.5rem;
  color: var(--bs-body-color);
  animation: loadingPulse 1.8s ease-in-out infinite;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bs-border-color, #dee2e6);
  border-top-color: var(--bs-body-color, #212529);
  border-radius: 50%;
  animation: loadingSpin 0.7s linear infinite;
}

@keyframes loadingPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Sortable drag ghost */
.sortable-ghost {
  background-color: var(--bs-tertiary-bg) !important;
  opacity: 0.6;
}

.drag-handle:hover {
  color: var(--bs-body-color);
}

/* Overdue row highlight */
.table>tbody>tr.row-overdue>td {
  background-color: rgba(220, 53, 69, 0.08);
}

[data-bs-theme="dark"] .table>tbody>tr.row-overdue>td {
  background-color: rgba(220, 53, 69, 0.15);
}

.table>tbody>tr.row-overdue:hover>td {
  background-color: rgba(220, 53, 69, 0.15);
}

[data-bs-theme="dark"] .table>tbody>tr.row-overdue:hover>td {
  background-color: rgba(220, 53, 69, 0.22);
}

.navbar .nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: var(--bs-body-color);
  opacity: 0.7;
}

.navbar .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.06);
  opacity: 1;
}

[data-bs-theme="dark"] .navbar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar .nav-link.active {
  font-weight: 600;
  opacity: 1;
  background-color: #212529;
  color: #fff !important;
}

[data-bs-theme="dark"] .navbar .nav-link.active {
  background-color: #f8f9fa;
  color: #212529 !important;
}

/* Admin Button */
.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-admin-nav:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--bs-body-color);
  border-color: #adb5bd;
}

[data-bs-theme="dark"] .btn-admin-nav:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #6c757d;
}

.btn-admin-nav.active {
  background-color: #212529;
  color: #fff;
  border-color: #212529;
}

[data-bs-theme="dark"] .btn-admin-nav.active {
  background-color: #f8f9fa;
  color: #212529;
  border-color: #f8f9fa;
}

/* Theme Switch */
.theme-switch-wrapper {
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.theme-switch-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-switch-wrapper .form-check-input {
  width: 2.2em;
  height: 1.15em;
  margin-top: 0;
  cursor: pointer;
  border-color: #adb5bd;
}

.theme-switch-wrapper .form-check-input:checked {
  background-color: #6c63ff;
  border-color: #6c63ff;
}

.theme-switch-wrapper .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.25);
  border-color: #6c63ff;
}

.theme-switch-wrapper .form-check-label {
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--bs-body-color);
  user-select: none;
}

#themeIcon,
.theme-switch-wrapper .form-check-label {
  display: inline-flex;
  align-items: center;
}

#themeLabel {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* User Nav Button */
.btn-user-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: none;
  background-color: #e9ecef;
  color: #212529;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-user-nav:hover {
  background-color: #dee2e6;
}

[data-bs-theme="dark"] .btn-user-nav {
  background-color: #2b3035;
  color: #e9ecef;
}

[data-bs-theme="dark"] .btn-user-nav:hover {
  background-color: #343a40;
}

.navbar .dropdown-toggle::after {
  display: none;
}

/* Page Header Bar */
.page-header-bar {
  background-color: var(--bs-body-bg);
}

.page-header-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.page-header-desc {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-header-bar::before {
  content: '';
  display: none;
}

/* Revizyon durum etiketleri - daha yüksek kontrast ve dark-mode uyumu */
.badge.bg-info-subtle {
  background-color: rgba(13, 110, 253, 0.14) !important;
  color: #084298 !important;
}

.badge.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.14) !important;
  color: #664d03 !important;
}

.badge.bg-success-subtle {
  background-color: rgba(25, 135, 84, 0.14) !important;
  color: #0f5132 !important;
}

[data-bs-theme="dark"] .badge.bg-info-subtle {
  background-color: rgba(13, 110, 253, 0.26) !important;
  color: #cfe5ff !important;
}

[data-bs-theme="dark"] .badge.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.22) !important;
  color: #fff3cd !important;
}

[data-bs-theme="dark"] .badge.bg-success-subtle {
  background-color: rgba(25, 135, 84, 0.22) !important;
  color: #d1e7dd !important;
}


/* ========================================
   Main Content Wrapper
   ========================================*/
.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   Icon Hover Effects
   ========================================*/
.fa-solid,
.fa-regular,
.fa-brands,
i[class*="fa-"] {
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

a:hover i[class*="fa-"],
button:hover i[class*="fa-"],
.btn:hover i[class*="fa-"],
.dropdown-item:hover i[class*="fa-"] {
  transform: scale(1.15);
  opacity: 0.85;
}

.stat-card:hover .stat-icon i {
  transform: scale(1.25) rotate(-5deg);
}

.btn-group .btn:hover i[class*="fa-"] {
  transform: scale(1.2);
}

/* ========================================
   Card Styles
   ========================================*/
.card {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  border-color: #e9ecef;
  border-radius: 8px;
}

.card:hover {
  box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .06) !important;
}

[data-bs-theme="dark"] .card {
  border-color: #2d2d2d;
}

/* Stat Cards */
.stat-card {
  border: 1px solid #e9ecef;
  cursor: default;
  border-radius: 8px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .35rem .75rem rgba(0, 0, 0, .08) !important;
}

[data-bs-theme="dark"] .stat-card {
  border-color: #2d2d2d;
}

/* Stat icon circles */
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f1f1;
  color: #333;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.stat-icon i {
  font-size: 0.95rem;
}

[data-bs-theme="dark"] .stat-icon {
  background-color: #2a2a2a;
  color: #ccc;
}

/* ========================================
   Colored Badge System
   ========================================*/

/* ====== İşler table uniform column widths ====== */
.isler-table {
  table-layout: fixed;
  width: 100%;
}

.isler-table th,
.isler-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Column width distribution (total ~100%)
   1: No, 2: Tarih & Saat, 3: Başlık, 4: Birim, 5: Tür,
   6: Durum/Öncelik, 7: Teslim, 8: İşlemler */
.isler-table th:nth-child(1),
.isler-table td:nth-child(1) {
  width: 3%;
}

.isler-table th:nth-child(2),
.isler-table td:nth-child(2) {
  width: 10%;
}

.isler-table th:nth-child(3),
.isler-table td:nth-child(3) {
  width: 20%;
}

.isler-table th:nth-child(4),
.isler-table td:nth-child(4) {
  width: 10%;
}

.isler-table th:nth-child(5),
.isler-table td:nth-child(5) {
  width: 7%;
}

.isler-table th:nth-child(6),
.isler-table td:nth-child(6) {
  width: 7%;
}

.isler-table th:nth-child(7),
.isler-table td:nth-child(7) {
  width: 10%;
}

.isler-table th:nth-child(8),
.isler-table td:nth-child(8) {
  width: 20%;
}

/* Ensure action buttons stay aligned right */
.isler-table td .btn-action-view,
.isler-table td .btn-action-edit,
.isler-table td .btn-action-delete {
  white-space: nowrap;
}

/* On small screens allow wrapping and horizontal scroll via .table-responsive */
@media (max-width: 768px) {
  .isler-table {
    table-layout: auto;
  }

  .isler-table th,
  .isler-table td {
    white-space: normal;
  }
}

/* Loading overlay for /isler AJAX filtering */
#isler-tables {
  position: relative;
}

.isler-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 1200;
}

[data-bs-theme="dark"] .isler-loading-overlay {
  background: rgba(7, 7, 7, 0.5);
}

.isler-loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.isler-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: #212529;
  animation: isler-spin 0.85s linear infinite;
}

[data-bs-theme="dark"] .isler-spinner {
  border-top-color: #f8f9fa;
  border-color: rgba(255, 255, 255, 0.08);
}

@keyframes isler-spin {
  to {
    transform: rotate(360deg);
  }
}

/* (filter-height rules removed per user request) */

/* Revizyon Durum Geçmişi Tablosu */
.revizyon-gecmisi-table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.revizyon-gecmisi-table thead th {
  background-color: var(--bs-body-bg);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  padding: 0.6rem 0.85rem;
}

.revizyon-gecmisi-table tbody td {
  padding: 0.48rem 0.85rem;
  vertical-align: middle;
}

.revizyon-gecmisi-table tbody tr:nth-child(odd) td {
  background-color: #fbfbfc;
}

[data-bs-theme="dark"] .revizyon-gecmisi-table tbody tr:nth-child(odd) td {
  background-color: rgba(255, 255, 255, 0.02);
}

.revizyon-gecmisi-table tbody tr:hover td {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .revizyon-gecmisi-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

.revizyon-gecmisi-table td small,
.revizyon-gecmisi-table td.time {
  color: #6c757d;
  font-size: 0.85rem;
}

.revizyon-gecmisi-table th:nth-child(1),
.revizyon-gecmisi-table td:nth-child(1) {
  width: 28%;
}

.revizyon-gecmisi-table th:nth-child(2),
.revizyon-gecmisi-table td:nth-child(2) {
  width: 28%;
}

.revizyon-gecmisi-table th:nth-child(3),
.revizyon-gecmisi-table td:nth-child(3) {
  width: 24%;
}

.revizyon-gecmisi-table th:nth-child(4),
.revizyon-gecmisi-table td:nth-child(4) {
  width: 20%;
}

/* Small screens: allow horizontal scroll */
.card .card-body.p-0 {
  overflow-x: auto;
}

[data-bs-theme="dark"] .revizyon-gecmisi-table thead th {
  background-color: #1a1a1a;
  color: #e9ecef;
}

.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.65em;
}

.badge-durum,
.badge-oncelik {
  border: none;
  font-size: 0.70rem;
  padding: 0.35em 0.6em;
}

/* Durum Badges - Soft colors */
.badge-planlamada {
  background-color: #17a2b8 !important;
  color: #fff !important;
}

.badge-beklemede {
  background-color: #d4a017 !important;
  color: #fff !important;
}

.badge-cekim {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.badge-kurgu {
  background-color: #6f42c1 !important;
  color: #fff !important;
}

.badge-onay {
  background-color: #fd7e14 !important;
  color: #fff !important;
}

.badge-tamam {
  background-color: #198754 !important;
  color: #fff !important;
}

.badge-revizyon {
  background-color: #dc3545 !important;
  color: #fff !important;
}

/* Dark-mode overrides for durum badges to ensure readable contrast */
[data-bs-theme="dark"] .badge-planlamada {
  background-color: #17a2b8 !important;
  color: #062022 !important;
}

[data-bs-theme="dark"] .badge-beklemede {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

[data-bs-theme="dark"] .badge-cekim {
  background-color: #6ea8fe !important;
  color: #031a36 !important;
}

[data-bs-theme="dark"] .badge-kurgu {
  background-color: #a98eda !important;
  color: #130a24 !important;
}

[data-bs-theme="dark"] .badge-onay {
  background-color: #feb272 !important;
  color: #2f1b05 !important;
}

[data-bs-theme="dark"] .badge-tamam {
  background-color: #75b798 !important;
  color: #05281a !important;
}

[data-bs-theme="dark"] .badge-revizyon {
  background-color: #ea868f !important;
  color: #2c0b0e !important;
}

/* Öncelik Badges */
.badge-acil {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.badge-yuksek {
  background-color: #fd7e14 !important;
  color: #fff !important;
}

.badge-normal {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.badge-dusuk {
  background-color: #adb5bd !important;
  color: #fff !important;
}

/* ========================================
   Progress Bar - Colored
   ========================================*/
.progress-bar {
  transition: width 0.6s ease;
}

.progress-bar-planlamada {
  background-color: #17a2b8;
  color: #fff;
}

.progress-bar-beklemede {
  background-color: #d4a017;
  color: #fff;
}

.progress-bar-cekim {
  background-color: #0d6efd;
  color: #fff;
}

.progress-bar-kurgu {
  background-color: #6f42c1;
  color: #fff;
}

.progress-bar-onay {
  background-color: #fd7e14;
  color: #fff;
}

.progress-bar-tamam {
  background-color: #198754;
  color: #fff;
}

.progress-bar {
  font-size: 0.75rem;
  font-weight: 600;
  overflow: visible;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* Stat card colored icon circles */
.stat-icon-toplam {
  background-color: rgba(33, 37, 41, 0.1);
  color: #212529;
}

.stat-icon-planlamada {
  background-color: rgba(23, 162, 184, 0.12);
  color: #17a2b8;
}

.stat-icon-beklemede {
  background-color: rgba(255, 193, 7, 0.15);
  color: #d4a017;
}

.stat-icon-cekim {
  background-color: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.stat-icon-kurgu {
  background-color: rgba(111, 66, 193, 0.12);
  color: #6f42c1;
}

.stat-icon-onay {
  background-color: rgba(253, 126, 20, 0.12);
  color: #fd7e14;
}

.stat-icon-tamam {
  background-color: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.stat-icon-geciken {
  background-color: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

.stat-icon-eklenen {
  background-color: rgba(13, 202, 240, 0.12);
  color: #0dcaf0;
}

.stat-icon-tamamlanan {
  background-color: rgba(25, 135, 84, 0.12);
  color: #198754;
}

/* Dark mode stat icon adjustments */
[data-bs-theme="dark"] .stat-icon-toplam {
  background-color: rgba(248, 249, 250, 0.1);
  color: #f8f9fa;
}

[data-bs-theme="dark"] .stat-icon-beklemede {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

[data-bs-theme="dark"] .stat-icon-cekim {
  background-color: rgba(13, 110, 253, 0.2);
  color: #6ea8fe;
}

[data-bs-theme="dark"] .stat-icon-kurgu {
  background-color: rgba(111, 66, 193, 0.2);
  color: #a98eda;
}

[data-bs-theme="dark"] .stat-icon-onay {
  background-color: rgba(253, 126, 20, 0.2);
  color: #feb272;
}

[data-bs-theme="dark"] .stat-icon-tamam {
  background-color: rgba(25, 135, 84, 0.2);
  color: #75b798;
}

[data-bs-theme="dark"] .stat-icon-geciken {
  background-color: rgba(220, 53, 69, 0.2);
  color: #ea868f;
}

[data-bs-theme="dark"] .stat-icon-eklenen {
  background-color: rgba(13, 202, 240, 0.2);
  color: #6edff6;
}

[data-bs-theme="dark"] .stat-icon-tamamlanan {
  background-color: rgba(25, 135, 84, 0.2);
  color: #75b798;
}

/* ========================================
   Page Container Width
   ========================================*/
.container {
  max-width: 1320px;
}

/* ========================================
   Tom Select Overrides
   ========================================*/
.ts-wrapper .ts-control {
  font-family: 'Poppins', sans-serif !important;
  border-color: var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: .375rem .75rem;
  min-height: calc(1.5em + .75rem + calc(var(--bs-border-width) * 2));
}

.ts-wrapper.focus .ts-control {
  border-color: #6c757d;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
  outline: 0;
}

[data-bs-theme="dark"] .ts-wrapper .ts-control {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .ts-wrapper .ts-dropdown {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .ts-wrapper .ts-dropdown .option:hover,
[data-bs-theme="dark"] .ts-wrapper .ts-dropdown .active {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Toast Notification Styles (B&W)
   ========================================*/
.toast-container-custom {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}

.custom-toast {
  padding: 0.55rem 1rem;
  border-radius: var(--bs-border-radius);
  font-size: 0.78rem;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .15);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-bottom: 0.5rem;
  max-width: 320px;
  background-color: #212529;
  color: #fff;
}

.custom-toast.toast-success {
  background-color: #212529;
}

.custom-toast.toast-error {
  background-color: #212529;
  border-left: 4px solid #999;
}

.custom-toast.toast-info {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #dee2e6;
}

.custom-toast.toast-warning {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #adb5bd;
}

/* ========================================
   Login Page
   ========================================*/
.login-brand-icon {
  width: 64px;
  height: 64px;
  background-color: #212529;
  color: #fff;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-bs-theme="dark"] .login-brand-icon {
  background-color: #f8f9fa;
  color: #212529;
}

/* ========================================
   Scrollbar (webkit)
   ========================================*/
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #444;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* ========================================
   Table
   ========================================*/
.table-hover tbody tr {
  transition: background-color 0.15s ease;
}

/* Revizyon tables: equal-width columns and truncation */
.revizyon-table {
  table-layout: fixed;
  width: 100%;
}

.revizyon-table th,
.revizyon-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.48rem 0.85rem;
}

.revizyon-table thead th {
  padding: 0.6rem 0.85rem;
}

.revizyon-table th:nth-child(1),
.revizyon-table td:nth-child(1) {
  width: 5%;
}

.revizyon-table th:nth-child(2),
.revizyon-table td:nth-child(2) {
  width: 10%;
}

.revizyon-table th:nth-child(3),
.revizyon-table td:nth-child(3) {
  width: 30%;
}

.revizyon-table th:nth-child(4),
.revizyon-table td:nth-child(4) {
  width: 10%;
}

.revizyon-table th:nth-child(5),
.revizyon-table td:nth-child(5) {
  width: 15%;
}

.revizyon-table th:nth-child(6),
.revizyon-table td:nth-child(6) {
  width: 15%;
}

.revizyon-table th:nth-child(7),
.revizyon-table td:nth-child(7) {
  width: 15%;
}

@media (max-width: 768px) {
  .revizyon-table {
    table-layout: auto;
  }

  .revizyon-table th,
  .revizyon-table td {
    white-space: normal;
  }
}

/* ========================================
   Misc Utilities
   ========================================*/
.border-bw {
  border-color: #dee2e6 !important;
}

[data-bs-theme="dark"] .border-bw {
  border-color: #343a40 !important;
}

/* --- Dark mode shadow adjustment --- */
[data-bs-theme="dark"] .shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .3) !important;
}

/* Form focus states - monochrome */
.form-control:focus,
.form-select:focus {
  border-color: #6c757d;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Links - monochrome */
a {
  color: #212529;
  transition: opacity 0.2s ease;
}

a:hover {
  color: #000;
  opacity: 0.75;
}

[data-bs-theme="dark"] a {
  color: #dee2e6;
}

[data-bs-theme="dark"] a:hover {
  color: #fff;
}

/* Keep btn links unaffected by generic link styling */
.btn {
  text-decoration: none;
}

.nav-link {
  text-decoration: none;
}

/* Alert - subtle B&W */
.alert-success {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #212529;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f1aeb5;
  color: #842029;
}

/* ========================================
   Admin Tabs
   ========================================*/
.admin-tabs .nav-link {
  color: var(--bs-body-color);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.admin-tabs .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.admin-tabs .nav-link.active {
  background-color: #212529;
  color: #fff;
}

[data-bs-theme="dark"] .admin-tabs .nav-link.active {
  background-color: #f8f9fa;
  color: #212529;
}

[data-bs-theme="dark"] .admin-tabs .nav-link:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.06);
}

/* ========================================
   Action Button Hover Colors
   ========================================*/
.btn-action-view,
.btn-action-edit,
.btn-action-delete,
.btn-action-restore {
  min-width: 32px;
  text-align: center;
}

.btn-action-view:hover {
  background-color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
  color: #000 !important;
}

.btn-action-edit:hover {
  background-color: #ffc107 !important;
  border-color: #ffc107 !important;
  color: #000 !important;
}

.btn-action-delete:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

.btn-action-restore:hover {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #fff !important;
}

/* Revizyon iste butonu özel stili (edit butonuna benzer, hover yeşil) */
.btn-revizyon-iste {
  min-width: 32px;
  text-align: center;
}

.btn-revizyon-iste:hover {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #fff !important;
}

/* ========================================
   Badge BW-Light
   ========================================*/
.badge-bw-light {
  background-color: #e9ecef !important;
  color: #212529 !important;
  border: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .badge-bw-light {
  background-color: #343a40 !important;
  color: #fff !important;
  border: 1px solid #495057;
}

/* Revizyon Modal dikey ortala */
#revizyonModal .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 1rem);
}

#revizyonModal .modal-content {
  margin: auto;
}