/* ============================================================
   Hasar Takip — Design System & Layout
   A calm, neutral enterprise palette with modern spacing.
   ============================================================ */

/* 1. Remove green border and shadow from valid fields */
.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-select:valid,
.form-select.is-valid {
  border-color: #dee2e6 !important;
  /* Reset to standard gray border */
  background-image: none !important;
  /* Remove the green checkmark icon */
  box-shadow: none !important;
}

/* 2. Hide the green "Looks good!" feedback text if you have it */
.valid-feedback,
.valid-tooltip {
  display: none !important;
}

/* 3. Keep focus state looking normal (optional) */
.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
  border-color: #86b7fe !important;
  /* Standard Bootstrap focus blue */
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}


/* ---------- 1. CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Brand */
  --ht-brand: #2563eb;
  --ht-brand-light: #dbeafe;
  --ht-brand-dark: #1e40af;

  /* Neutral scale */
  --ht-gray-50: #f8fafc;
  --ht-gray-100: #f1f5f9;
  --ht-gray-200: #e2e8f0;
  --ht-gray-300: #cbd5e1;
  --ht-gray-400: #94a3b8;
  --ht-gray-500: #64748b;
  --ht-gray-600: #475569;
  --ht-gray-700: #334155;
  --ht-gray-800: #1e293b;
  --ht-gray-900: #0f172a;

  /* Semantic */
  --ht-success: #16a34a;
  --ht-warning: #d97706;
  --ht-danger: #dc2626;
  --ht-info: #0891b2;

  /* Surfaces */
  --ht-body-bg: var(--ht-gray-100);
  --ht-sidebar-bg: #ffffff;
  --ht-sidebar-width: 260px;
  --ht-navbar-height: 60px;
  --ht-card-bg: #ffffff;

  /* Shadows */
  --ht-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --ht-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --ht-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --ht-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, .07), 0 4px 6px -4px rgba(15, 23, 42, .04);

  /* Radius */
  --ht-radius-sm: 0.375rem;
  --ht-radius: 0.5rem;
  --ht-radius-lg: 0.75rem;

  /* Transitions */
  --ht-transition: 150ms ease;
}

/* ---------- 2. Base & Reset Tweaks ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ht-body-bg);
  color: var(--ht-gray-900);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
}

a {
  color: var(--ht-brand);
  text-decoration: none;
}

a:hover {
  color: var(--ht-brand-dark);
}

::selection {
  background-color: var(--ht-brand-light);
  color: var(--ht-brand-dark);
}

/* ---------- 3. Navbar ---------- */
.ht-navbar {
  height: var(--ht-navbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--ht-gray-200);
  box-shadow: var(--ht-shadow-sm);
  z-index: 1030;
}

.ht-navbar .ht-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ht-brand);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

/* User dropdown */
.ht-user-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--ht-gray-50);
  border: 1px solid var(--ht-gray-200);
  border-radius: var(--ht-radius);
  padding: .35rem .75rem;
  font-size: .875rem;
  color: var(--ht-gray-700);
  transition: background var(--ht-transition);
  cursor: pointer;
}

.ht-user-btn:hover {
  background: var(--ht-gray-100);
}

.ht-user-btn .ht-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ht-brand-light);
  color: var(--ht-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .8rem;
}

/* ---------- 4. Sidebar ---------- */
.ht-sidebar {
  width: var(--ht-sidebar-width);
  background: var(--ht-sidebar-bg);
  border-right: 1px solid var(--ht-gray-200);
  position: fixed;
  top: var(--ht-navbar-height);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1020;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ht-gray-300) transparent;
  transition: transform .25s ease;
  transform: translateX(0);
}

.ht-sidebar::-webkit-scrollbar {
  width: 5px;
}

.ht-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.ht-sidebar::-webkit-scrollbar-thumb {
  background: var(--ht-gray-300);
  border-radius: 10px;
}

.ht-sidebar .nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ht-gray-400);
  padding: .75rem 1.25rem .35rem;
  margin: 0;
}

.ht-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ht-gray-600);
  border-radius: 0;
  transition: color var(--ht-transition), background var(--ht-transition);
  position: relative;
}

.ht-sidebar .nav-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.ht-sidebar .nav-link:hover {
  color: var(--ht-brand);
  background: var(--ht-brand-light);
}

.ht-sidebar .nav-link.active {
  color: var(--ht-brand);
  background: var(--ht-brand-light);
  font-weight: 600;
}

.ht-sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: .35rem;
  bottom: .35rem;
  width: 3px;
  background: var(--ht-brand);
  border-radius: 0 3px 3px 0;
}

/* Mobile offcanvas sidebar overrides */
.offcanvas.ht-sidebar-offcanvas {
  width: var(--ht-sidebar-width);
  background: var(--ht-sidebar-bg);
}

.offcanvas.ht-sidebar-offcanvas .offcanvas-header {
  border-bottom: 1px solid var(--ht-gray-200);
  padding: .85rem 1.25rem;
}

.offcanvas.ht-sidebar-offcanvas .offcanvas-body {
  padding: 0;
}

.ht-sidebar-offcanvas .nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ht-gray-400);
  padding: .75rem 1.25rem .35rem;
  margin: 0;
}

.ht-sidebar-offcanvas .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ht-gray-600);
  border-radius: 0;
  transition: color var(--ht-transition), background var(--ht-transition);
  position: relative;
  text-decoration: none;
}

.ht-sidebar-offcanvas .nav-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.ht-sidebar-offcanvas .nav-link:hover {
  color: var(--ht-brand);
  background: var(--ht-brand-light);
}

.ht-sidebar-offcanvas .nav-link.active {
  color: var(--ht-brand);
  background: var(--ht-brand-light);
  font-weight: 600;
}

.ht-sidebar-offcanvas .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: .35rem;
  bottom: .35rem;
  width: 3px;
  background: var(--ht-brand);
  border-radius: 0 3px 3px 0;
}

/* ---------- 5. Main Content Area ---------- */
@media (min-width: 992px) {
  .ht-main {
    margin-left: var(--ht-sidebar-width);
  }
}

.ht-main {
  transition: margin-left .25s ease;
}

.ht-main {
  padding-top: calc(var(--ht-navbar-height) + 1px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .ht-sidebar-collapsed .ht-sidebar {
    transform: translateX(-100%);
  }

  .ht-sidebar-collapsed .ht-main {
    margin-left: 0;
  }
}

.ht-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ht-footer {
  margin-top: auto !important;
  padding: 1.5rem 0 0.5rem;
  color: var(--ht-gray-500);
  font-size: .85rem;
}

@media (min-width: 768px) {
  .ht-content {
    padding: 1.5rem 1.75rem;
  }
}

/* ---------- 6. Page Header ---------- */
.ht-page-header {
  margin-bottom: 1.5rem;
}

.ht-page-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ht-gray-900);
  margin: 0;
  line-height: 1.3;
}

.ht-page-header .ht-subtitle {
  font-size: .875rem;
  color: var(--ht-gray-500);
  margin-top: .2rem;
}

.ht-page-header .ht-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- 7. Cards ---------- */
.ht-card {
  background: var(--ht-card-bg);
  border: 1px solid var(--ht-gray-200);
  border-radius: var(--ht-radius);
  box-shadow: var(--ht-shadow-sm);
  transition: box-shadow var(--ht-transition);
}

.ht-card:hover {
  box-shadow: var(--ht-shadow);
}

.ht-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--ht-gray-200);
  font-weight: 500;
  font-size: 1.1rem;
  padding: .85rem 1.15rem;
  color: var(--ht-gray-800);
}

.ht-card .card-body {
  padding: 1.15rem;
}

/* Unit headers inside cards */
.ht-card .ht-unit-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ht-gray-800);
  display: inline-flex;
  align-items: center;
}

/* ---------- 8. Table Helpers ---------- */
.ht-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ht-table {
  width: 100%;
  font-size: .875rem;
  margin-bottom: 0;
}

.ht-table thead th {
  position: sticky;
  top: 0;
  background: var(--ht-gray-50);
  border-bottom: 2px solid var(--ht-gray-200);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ht-gray-600);
  padding: .7rem .75rem;
  white-space: nowrap;
  z-index: 2;
}

.ht-table tbody td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--ht-gray-100);
  vertical-align: middle;
  color: var(--ht-gray-700);
}

.ht-table.ht-table--docs thead th {
  padding: .55rem .8rem;
}

.ht-table.ht-table--docs tbody td {
  padding: .5rem .8rem;
}

.ht-table.ht-table--docs .text-truncate {
  display: inline;
  white-space: normal;
  word-break: break-word;
}

.ht-table-wrap.ht-table-wrap--docs {
  max-height: 445px;
  overflow-y: auto;
}

@media (max-width: 576.98px) {

  .ht-table.ht-table--docs thead th:nth-child(3),
  .ht-table.ht-table--docs thead th:nth-child(4),
  .ht-table.ht-table--docs tbody td:nth-child(3),
  .ht-table.ht-table--docs tbody td:nth-child(4) {
    display: none;
  }
}

.ht-table.ht-table--docs tbody td.text-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem;
}

.ht-table tbody tr:hover {
  background: var(--ht-gray-50);
}

.ht-table.ht-table-sticky-header {
  position: relative;
}

.ht-table.ht-table-sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* ---------- 9. Buttons ---------- */
.btn-ht-primary {
  background: var(--ht-brand);
  border-color: var(--ht-brand);
  color: #fff;
  border-radius: var(--ht-radius-sm);
  font-weight: 500;
  font-size: .875rem;
  padding: .45rem 1rem;
  transition: background var(--ht-transition), box-shadow var(--ht-transition);
}

.btn-ht-info {
  background: var(--ht-info);
  border-color: var(--ht-info);
  color: #fff;
  border-radius: var(--ht-radius-sm);
  font-weight: 500;
  font-size: .875rem;
  padding: .45rem 1rem;
  transition: background var(--ht-transition), box-shadow var(--ht-transition);
}

.btn-ht-primary:hover {
  background: var(--ht-brand-dark);
  border-color: var(--ht-brand-dark);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.btn-ht-info:hover {
  background: #0e7490;
  border-color: #0e7490;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, .18);
}

.btn-ht-outline {
  background: transparent;
  border: 1px solid var(--ht-gray-300);
  color: var(--ht-gray-700);
  border-radius: var(--ht-radius-sm);
  font-weight: 500;
  font-size: .875rem;
  padding: .45rem 1rem;
  transition: border-color var(--ht-transition), color var(--ht-transition);
}

.btn-ht-outline:hover {
  border-color: var(--ht-brand);
  color: var(--ht-brand);
}

/* ---------- 10. Toasts ---------- */
.ht-toast-container {
  position: fixed;
  top: calc(var(--ht-navbar-height) + 1rem);
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.ht-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--ht-gray-200);
  border-radius: var(--ht-radius);
  box-shadow: var(--ht-shadow-lg);
  padding: .8rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .875rem;
  animation: htToastIn .3s ease forwards;
}

.ht-toast.ht-toast-exit {
  animation: htToastOut .25s ease forwards;
}

.ht-toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ht-toast-body {
  flex: 1;
}

.ht-toast-title {
  font-weight: 600;
  margin-bottom: .15rem;
}

.ht-toast-message {
  color: var(--ht-gray-600);
  font-size: .825rem;
}

.ht-toast-close {
  background: none;
  border: none;
  color: var(--ht-gray-400);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--ht-transition);
}

.ht-toast-close:hover {
  color: var(--ht-gray-700);
}

.ht-toast--success .ht-toast-icon {
  color: var(--ht-success);
}

.ht-toast--error .ht-toast-icon {
  color: var(--ht-danger);
}

.ht-toast--info .ht-toast-icon {
  color: var(--ht-info);
}

.ht-toast--warning .ht-toast-icon {
  color: var(--ht-warning);
}

.ht-toast--success {
  border-left: 3px solid var(--ht-success);
}

.ht-toast--error {
  border-left: 3px solid var(--ht-danger);
}

.ht-toast--info {
  border-left: 3px solid var(--ht-info);
}

.ht-toast--warning {
  border-left: 3px solid var(--ht-warning);
}

@keyframes htToastIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes htToastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* ---------- 11. Badge helpers ---------- */
.badge {
  font-weight: 600;
  padding: .35em .65em;
  border-radius: 6px;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.badge.bg-success {
  background-color: #059669 !important;
  /* emerald 600 */
}

.badge.bg-danger {
  background-color: #dc2626 !important;
  /* red 600 */
}

.badge.bg-primary {
  background-color: var(--ht-brand) !important;
}

.badge.bg-secondary {
  background-color: var(--ht-gray-500) !important;
}

/* Soft variants */
.bg-soft-info {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
}

.bg-soft-success {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}

.bg-soft-warning {
  background-color: #fffbeb !important;
  color: #92400e !important;
}

.ht-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 999px;
  line-height: 1;
}

.ht-badge-big {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: .35rem .7rem;
  border-radius: 999px;
  line-height: 1;
}

.ht-badge--yellow {
  background: #fef9c3;
  color: #a16207;
}

.ht-badge--red {
  background: #fee2e2;
  color: #b91c1c;
}

.ht-badge--gray {
  background: var(--ht-gray-200);
  color: var(--ht-gray-600);
}

.ht-badge--green {
  background: #dcfce7;
  color: #166534;
}

/* ---------- 12. Utility Classes ---------- */
.text-muted-ht {
  color: var(--ht-gray-600) !important;
}

.bg-body-ht {
  background: var(--ht-body-bg) !important;
}

/* Responsive sidebar hide/show */
@media (max-width: 991.98px) {
  .ht-sidebar {
    display: none;
  }
}

/* ---------- 13. Scrollbar (global subtle) ---------- */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--ht-gray-300);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ht-gray-400);
}

/* ---------- 14. Sortable Table Headers ---------- */
.ht-table th.ht-sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--ht-transition);
}

.ht-table th.ht-sortable:hover {
  color: var(--ht-brand);
}

.ht-table th.ht-sortable i {
  font-size: .7rem;
  vertical-align: middle;
}

/* ---------- 15. Pagination Bar ---------- */
.ht-pagination-bar {
  border-top: 1px solid var(--ht-gray-200);
}

.ht-pagination-bar .page-link {
  font-size: .8rem;
  color: var(--ht-gray-600);
  border-color: var(--ht-gray-200);
  background-color: #ffffff;
  min-width: 2rem;
  text-align: center;
}

.ht-pagination-bar .page-link:hover {
  background-color: var(--ht-gray-100);
  color: var(--ht-gray-800);
}

.ht-pagination-bar .page-item.active .page-link {
  background: var(--ht-brand-light);
  border-color: var(--ht-brand-light);
  color: var(--ht-brand-dark);
}

.ht-pagination-bar .page-item.active .page-link:hover {
  background: var(--ht-brand);
  border-color: var(--ht-brand);
  color: #ffffff;
}

/* ---------- 16. Offcanvas Filter Panel ---------- */
.offcanvas.offcanvas-end {
  width: 320px;
  max-width: 90vw;
}

/* Cases page: wider advanced filters panel */
#casesFiltersOffcanvas.offcanvas-end {
  width: 420px;
  max-width: 95vw;
}

.offcanvas .offcanvas-body .form-label {
  margin-bottom: .3rem;
}

/* ---------- 17. Toolbar row ---------- */
.ht-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .65rem .85rem;
}

.ht-toolbar .ht-toolbar-search {
  flex: 1 1 260px;
  max-width: 480px;
  position: relative;
}

.ht-toolbar .ht-toolbar-search .form-control {
  padding-left: 2.1rem;
  font-size: .85rem;
}

.ht-toolbar .ht-toolbar-search .ht-search-icon {
  position: absolute;
  left: .65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ht-gray-400);
  font-size: .9rem;
  pointer-events: none;
}

/* ---------- 18. Quick-filter chips ---------- */
.ht-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.ht-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  font-size: .78rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--ht-gray-300);
  background: transparent;
  color: var(--ht-gray-600);
  cursor: pointer;
  transition: all var(--ht-transition);
  white-space: nowrap;
}

.ht-chip:hover {
  border-color: var(--ht-brand);
  color: var(--ht-brand);
  background: var(--ht-brand-light);
}

.ht-chip.active {
  border-color: var(--ht-brand);
  background: var(--ht-brand);
  color: #fff;
}

.ht-chip .ht-chip-count {
  font-size: .65rem;
  background: rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: .1rem .35rem;
  line-height: 1;
  min-width: 1.1rem;
  text-align: center;
}

.ht-chip.active .ht-chip-count {
  background: rgba(255, 255, 255, .3);
}

/* ---------- 19. Text truncation helpers ---------- */
.ht-truncate {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.ht-truncate-note {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
  cursor: default;
}

/* ---------- 20. Filter section label (offcanvas) ---------- */
.ht-filter-section {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ht-gray-400);
  margin-top: .75rem;
  margin-bottom: .5rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--ht-gray-100);
}

.ht-filter-section:first-child {
  margin-top: 0;
}

/* ---------- 21. Info alert ---------- */
.ht-info-bar {
  background: var(--ht-brand-light);
  border: 1px solid rgba(37, 99, 235, .15);
  border-radius: var(--ht-radius);
  padding: .6rem 1rem;
  font-size: .85rem;
  color: var(--ht-brand-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Shared compact input typography */
.ht-input-sm {
  font-size: .9rem;
}

.ht-info-bar i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- 22. Case Detail — Sticky Header ---------- */
.ht-case-header {
  background: var(--ht-card-bg);
  border: 1px solid var(--ht-gray-200);
  border-radius: var(--ht-radius);
  box-shadow: var(--ht-shadow-sm);
  padding: .85rem 1.15rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: calc(var(--ht-navbar-height) + 8px);
  z-index: 10;
}

.ht-case-header .ht-case-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ht-gray-900);
  margin: 0;
  line-height: 1.35;
}

.ht-case-header .ht-case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .9rem;
  font-size: .82rem;
  color: var(--ht-gray-600);
  margin-top: .2rem;
}

.ht-case-header .ht-case-meta i {
  font-size: .85rem;
}

/* ---------- 23. Key-Value Grid ---------- */
.ht-kv-grid {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .ht-kv-grid {
    grid-template-columns: 1fr 1fr;
  }
}



.ht-kv-grid.ht-kv-grid--full {
  grid-template-columns: 1fr;
}

.ht-kv-item.ht-kv-full {
  grid-column: 1 / -1;
}

.ht-kv-label {
  font-size: 0.8rem;
  /*.72rem;*/
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ht-gray-600);
  margin-bottom: .3rem;
}

.ht-kv-value {
  font-size: 0.95rem;
  /*.875rem;*/
  font-weight: 500;
  color: var(--ht-gray-800);
  word-break: break-word;
}

.ht-kv-value.ht-kv-empty {
  color: var(--ht-gray-400);
  font-style: italic;
}

/* Unit field labels */
.ht-unit-field-label {
  font-size: 0.9rem;
  /* 84rem; */
  color: var(--ht-gray-700);
}

/* Case Detail — collapsible "Dosya Genel Bilgileri" */
.ht-genel-header {
  display: flex;
  align-items: center;
}

.ht-genel-row-separator {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--ht-gray-200);
  opacity: 1;
}

.ht-genel-separator {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--ht-gray-300);
  opacity: 1;
}

.ht-genel-notes-row {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .ht-genel-notes-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ht-genel-note {
  min-width: 0;
}

.ht-genel-container {
  display: grid;
  /* Fixed width for labels to ensure vertical alignment of values across rows */
  grid-template-columns: 130px 1fr;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-items: baseline;
}

.ht-genel-item {
  /* This allows the item to span both columns of the parent grid */
  display: contents;
  align-items: center;
}

.ht-genel-note .ht-genel-title {
  padding-bottom: 5px;
}

.ht-genel-container .ht-genel-value {
  padding-left: 12px;
}

.ht-genel-title {
  grid-column: 1;
  /* Always stays in the first column */
  width: 170px;
  font-size: .75rem;
  padding-top: 2px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ht-gray-500);
}

.ht-genel-value {
  grid-column: 2;
  /* Always stays in the second column */
  font-weight: 500;
  font-size: .875rem;
  letter-spacing: 0.02em;
  color: var(--ht-gray-700);
  word-break: break-word;
}


/* Unit navigation card */
.ht-unit-nav .nav-link {
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 999px;
}

.ht-unit-nav .nav-link i {
  font-size: .9rem;
}

.ht-genel-toggle {
  color: inherit;
  font-weight: 600;
  font-size: inherit;
  text-align: left;
}

.ht-genel-toggle:hover {
  color: var(--ht-brand);
}

.ht-genel-chevron {
  display: inline-block;
  transition: transform var(--ht-transition);
}

.ht-genel-collapsed .ht-genel-chevron {
  transform: rotate(-90deg);
}

.ht-genel-collapsed .ht-genel-body {
  display: none;
}

/* ---------- 24. Module Navigation ---------- */
.ht-module-nav-desktop {
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  width: 250px;
}

.ht-module-nav-desktop::-webkit-scrollbar {
  display: none;
}

.ht-module-nav-desktop .card-header {
  font-size: 1.2rem;
}

.ht-module-nav-desktop .nav-pills {
  flex-direction: column;
  align-items: stretch;
  gap: .15rem;
}

.ht-module-nav-desktop .nav-pills .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  white-space: normal;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--ht-radius-sm);
  color: var(--ht-gray-600);
  border: 1px solid transparent;
  transition: all var(--ht-transition);
}

.ht-module-nav-desktop .nav-pills .nav-link:hover {
  background: var(--ht-gray-100);
  color: var(--ht-brand);
  border-color: var(--ht-brand-light);
  box-shadow: var(--ht-shadow-sm);
}

.ht-module-nav-desktop .nav-pills .nav-link.active {
  background: var(--ht-brand);
  color: #fff;
}

.ht-module-desktop-wrap {
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .ht-module-desktop-wrap {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }
}

.ht-module-main {
  flex: 1;
  min-width: 0;
}

.ht-module-nav-mobile {
  margin-bottom: 1.25rem;
}

.ht-module-nav-mobile select {
  font-size: .85rem;
}

/* ---------- 25. Skeleton / Placeholder loading ---------- */
.ht-skeleton {
  background: linear-gradient(90deg, var(--ht-gray-100) 25%, var(--ht-gray-200) 50%, var(--ht-gray-100) 75%);
  background-size: 200% 100%;
  animation: htShimmer 1.5s ease-in-out infinite;
  border-radius: var(--ht-radius-sm);
  display: inline-block;
}

.ht-skeleton-text {
  height: .85rem;
  width: 100%;
  margin-bottom: .5rem;
}

.ht-skeleton-text.w-75 {
  width: 75%;
}

.ht-skeleton-text.w-50 {
  width: 50%;
}

.ht-skeleton-text.w-25 {
  width: 25%;
}

.ht-skeleton-title {
  height: 1.3rem;
  width: 50%;
  margin-bottom: .75rem;
}

@keyframes htShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ---------- 26. Note list ---------- */
.ht-note-item {
  border-bottom: 1px solid var(--ht-gray-100);
  padding: .75rem 0;
}

.ht-note-item:last-child {
  border-bottom: none;
}

.ht-note-meta {
  font-size: .75rem;
  color: var(--ht-gray-400);
  margin-bottom: .25rem;
}

.ht-note-body {
  font-size: .875rem;
  color: var(--ht-gray-700);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 27. Upload area ---------- */
.ht-upload-area {
  border: 2px dashed var(--ht-gray-300);
  border-radius: var(--ht-radius);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ht-gray-400);
  cursor: pointer;
  transition: border-color var(--ht-transition), background var(--ht-transition);
}

.ht-upload-area:hover,
.ht-upload-area.dragover {
  border-color: var(--ht-brand);
  background: var(--ht-brand-light);
  color: var(--ht-brand);
}

.ht-upload-area i {
  font-size: 2rem;
}

/* Upload progress indicator (circular) */
.ht-progress-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 600;
  color: var(--ht-gray-800);
}

/* ---------- 28. Footer ---------- */
.ht-footer {
  padding: 1.25rem 0;
  font-size: .8rem;
  color: var(--ht-gray-400);
  border-top: 1px solid var(--ht-gray-200);
  margin-top: 3rem;
}

/* ---------- 29. Cases page specific typography tweaks ---------- */
.ht-page-cases .ht-page-header .ht-subtitle {
  color: var(--ht-gray-600);
}

.ht-card .ht-table tbody td {
  color: var(--ht-gray-800);
}

/* ---------- 24. Case Detail: Mobile Module Accordion ---------- */
.ht-mobile-accordion .accordion-item {
  border: 1px solid var(--ht-gray-200);
  border-radius: var(--ht-radius) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--ht-shadow-sm);
  background: #fff;
}

.ht-mobile-accordion .accordion-button {
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ht-gray-800);
  background: transparent;
  box-shadow: none;
}

.ht-mobile-accordion .accordion-button:not(.collapsed) {
  color: var(--ht-brand);
  background: var(--ht-gray-50);
  border-bottom: 1px solid var(--ht-gray-200);
}

.ht-mobile-accordion .accordion-button::after {
  background-size: 1rem;
}

.ht-mobile-accordion .accordion-body {
  background: var(--ht-body-bg);
}

/* On mobile, hide the main module area if we are using the accordion */
@media (max-width: 767.98px) {
  #moduleContent {
    display: none;
  }

  /* Hide button labels on mobile */
  .btn .ht-btn-label {
    display: none !important;
  }

  /* Remove spacing for icons in buttons ONLY when the label is being hidden */
  .btn:has(.ht-btn-label) i.me-1,
  .btn:has(.ht-btn-label) i.me-2 {
    margin-right: 0 !important;
  }
}