/* Rem kökü: Bootstrap bileşenleri (btn, form-control, başlıklar) buna göre ölçeklenir.
   Önceki: mobil 14px / md+ 16px — masaüstünde yazılar fazla büyüyordu. */
html {
  font-size: 13px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

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

body {
  margin-bottom: 60px;
  font-size: 1rem;
  line-height: 1.45;
}

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

/* —— Giriş sayfası (Account/Login) —— */
.login-body {
  margin-bottom: 0;
  min-height: 100vh;
}

.login-page {
  background: #f0f4f8;
}

.login-hero {
  position: relative;
  overflow: hidden;
  background: #084298;
}

.login-hero::before {
  display: none;
}

.login-hero-content {
  position: relative;
  z-index: 1;
}

.login-brand-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-form-area {
  background: transparent;
}

.login-card {
  border-radius: 1rem !important;
}

.login-card .input-group-text {
  border-radius: 0.5rem 0 0 0.5rem;
}

.login-card .input-group .form-control {
  border-radius: 0 0.5rem 0.5rem 0;
}

.mt-px {
  margin-top: 2px;
}

@media (min-width: 992px) {
  .login-page {
    background: #f0f4f8;
  }

  .login-hero {
    min-height: 100vh;
  }
}

/* —— Firmalar: filtre + tablo —— */
.firmalar-page {
  max-width: 100%;
  padding-bottom: 3rem;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.firmalar-page .bayi-kayit-form {
  width: 100%;
  max-width: none;
}

.firmalar-page .bayi-kayit-form .col-form-label {
  font-weight: 500;
  color: var(--bs-secondary-color);
}

/* Bayiler kartı: etiket ve kutuları grid ile hizalı */
@media (max-width: 767.98px) {
  .firmalar-page .bayi-form-grid .bayi-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
  }

  .firmalar-page .bayi-form-grid .bayi-form-row:last-child {
    margin-bottom: 0;
  }

  .firmalar-page .bayi-form-grid .bayi-form-field .form-control {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .firmalar-page .bayi-form-grid {
    display: grid;
    grid-template-columns: 7.75rem 25rem 6rem minmax(13rem, 18rem);
    column-gap: 0.5rem;
    row-gap: 0.45rem;
    align-items: center;
    justify-content: start;
  }

  .firmalar-page .bayi-form-grid .bayi-form-row {
    display: contents;
  }

  .firmalar-page .bayi-form-grid .bayi-form-lbl {
    padding-right: 0;
    padding-left: 0;
    margin-bottom: 0;
    justify-self: stretch;
    align-self: center;
  }

  .firmalar-page .bayi-form-grid .bayi-form-lbl--second {
    justify-self: stretch;
  }

  .firmalar-page .bayi-form-grid .bayi-form-field {
    min-width: 0;
  }

  .firmalar-page .bayi-form-grid .bayi-form-field .form-control {
    width: 100%;
  }

  /*
    Kod satırı: birleşik hücre grid'i doğru satırlara bölmek için gerekli;
    kutu genişliği Bayi adı sütunu ile aynı (25rem), sağa taşmaz.
  */
  .firmalar-page .bayi-form-grid .bayi-form-field--kod {
    grid-column: 2 / -1;
    width: 25rem;
    max-width: 100%;
    justify-self: start;
    box-sizing: border-box;
  }

  /* Bayi adı / Yetkili: orta sütun tam 25rem — kutular gerçekten uzar */
  .firmalar-page .bayi-form-grid .bayi-form-field--grow {
    min-width: 0;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  /* Telefon / Şehir */
  .firmalar-page .bayi-form-grid .bayi-form-field--tel {
    min-width: 0;
    width: 100%;
    justify-self: stretch;
  }
}

.firmalar-page .sk-table {
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 450;
  font-feature-settings: "tnum" 1;
}

.firmalar-page .sk-table thead th,
.firmalar-page .sk-table tbody td {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
}

.firmalar-page .sk-table thead th {
  font-size: 0.875rem;
  font-weight: 600;
  background: #cfd6df !important;
  border-bottom: 2px solid #b8c2ce !important;
}

.firmalar-page .sk-td-firma {
  font-weight: 500;
}

.firmalar-page .sk-td-id {
  font-weight: 600;
  color: #084298;
}

.firmalar-page .sk-td-num {
  font-variant-numeric: tabular-nums;
}

.sk-firma-link {
  border-radius: 0.25rem;
}

.sk-firma-link:hover {
  color: #084298 !important;
  text-decoration: underline !important;
}

.sk-total-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #e8eef5;
  border: 1px solid rgba(8, 66, 152, 0.2);
  box-shadow: 0 1px 4px rgba(8, 66, 152, 0.06);
}

.sk-total-pill__n {
  font-size: 1.35rem;
  font-weight: 700;
  color: #084298;
  letter-spacing: -0.02em;
}

.sk-total-pill__t {
  font-size: 0.8rem;
  color: #5c6b7a;
  text-transform: lowercase;
}

.sk-filter-card {
  border-radius: 0.75rem !important;
  overflow: hidden;
  background: #fff;
}

.sk-filter-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #084298;
  color: #fff;
}

.sk-filter-card__head--toggle {
  cursor: pointer;
  user-select: none;
}

.sk-filter-card__head--toggle:hover {
  filter: brightness(1.06);
}

.sk-filter-card__chev {
  display: inline-block;
  font-size: 0.55rem;
  margin-left: 0.15rem;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.sk-filter-card--collapsed .sk-filter-card__chev {
  transform: rotate(-90deg);
}

.sk-filter-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.15);
}

.sk-filter-head-total {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  line-height: 1.2;
}

.sk-filter-head-total__n {
  font-size: calc(0.8125rem + 2pt);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.sk-filter-head-total__t {
  font-size: calc(0.65rem + 2pt);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-transform: lowercase;
}

.firmalar-page .sk-filter-head-total--toolbar {
  background: rgba(8, 66, 152, 0.1);
  border: 1px solid rgba(8, 66, 152, 0.22);
}

.firmalar-page .sk-filter-head-total--toolbar .sk-filter-head-total__n {
  color: #084298;
}

.firmalar-page .sk-filter-head-total--toolbar .sk-filter-head-total__t {
  color: #5c6b7a;
}

.sk-filter-card__body {
  padding-top: 0.65rem !important;
}


.sk-filter-section {
  height: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  background: #f3f5f8;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Firmalar: sol chipler, orta durum/program, sağ arama alanı */
.firmalar-page .sk-filter-row--top {
  align-items: stretch;
}

.firmalar-page .sk-filter-row--top .sk-col-chips .sk-filter-section {
  display: flex;
  align-items: stretch;
}

.firmalar-page .sk-filter-row--top .sk-col-search .row.g-2 {
  max-width: none;
}

.sk-label {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
}

.sk-input {
  border-radius: 0.5rem;
  border-color: #dee2e6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sk-input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.sk-satis-block {
  padding: 0.5rem 0.35rem 0.35rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid rgba(8, 66, 152, 0.12);
}

.sk-satis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sk-chip {
  cursor: pointer;
  margin: 0;
}

.sk-chip__ui {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 2px solid transparent;
  opacity: 0.95;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.sk-chip:hover .sk-chip__ui {
  opacity: 1;
}

/* DEMO — mavi tonlar: pasif açık, aktif belirgin koyu mavi */
.sk-chip--demo .sk-chip__ui {
  color: #3d4f66;
  background: #d4e1f0;
  border-color: #8fa9c4;
  border-style: solid;
}

.sk-chip--demo:hover .sk-chip__ui {
  border-color: #5f7da3;
  background: #c4d4e8;
  color: #2d3d52;
}

.sk-chip--demo.sk-chip--on .sk-chip__ui {
  opacity: 1;
  color: #ffffff;
  font-weight: 700;
  background: #2f6fa8;
  border: 2px solid #1a4d7a;
  box-shadow: 0 2px 6px rgba(26, 77, 122, 0.35);
}

/* SATIŞ — daha açık yeşil tonlar */
.sk-chip--satis .sk-chip__ui {
  color: #3d6b38;
  background: #f1faf0;
  border-color: #b8e3a8;
  border-style: dashed;
}

.sk-chip--satis:hover .sk-chip__ui {
  border-color: #7bc86a;
  border-style: solid;
  background: #e6f5e1;
}

.sk-chip--satis.sk-chip--on .sk-chip__ui {
  opacity: 1;
  font-weight: 700;
  color: #1a3516;
  background: #9ad985;
  border: 2px solid #6bb85c;
  border-style: solid;
  box-shadow: 0 1px 5px rgba(107, 184, 92, 0.35);
}

/* TAKİP — pasif soluk sarı */
.sk-chip--takip .sk-chip__ui {
  color: #5c5c1a;
  background: #fffef0;
  border-color: #ddd68b;
  border-style: dashed;
}

.sk-chip--takip:hover .sk-chip__ui {
  border-color: #c4c430;
  border-style: solid;
  background: #fffcd9;
}

.sk-chip--takip.sk-chip--on .sk-chip__ui {
  opacity: 1;
  font-weight: 700;
  color: #2d2d00;
  background: #ffff66;
  border: 2px solid #b8b82e;
  border-style: solid;
  box-shadow: 0 1px 5px rgba(184, 184, 46, 0.35);
}

.sk-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.sk-btn-listele {
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1.15rem;
  font-weight: 600;
  background-color: #157347 !important;
  color: #fff !important;
  box-shadow: 0 1px 4px rgba(21, 115, 71, 0.25);
}

/* Varsayılan .btn hover (bs-body-bg / açık zemin) yeşili ezmesin */
.sk-btn-listele:hover,
.sk-btn-listele:focus-visible {
  background-color: #22a85f !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(21, 115, 71, 0.35);
}

.sk-btn-listele:active {
  background-color: #126040 !important;
  color: #fff !important;
}

.sk-btn-ghost {
  border-radius: 0.6rem !important;
}

.sk-page-size {
  display: flex;
  align-items: center;
}

.sk-page-size-select {
  width: 5.5rem !important;
}

.sk-table-wrap {
  border-radius: 1rem !important;
  overflow: hidden;
}

.sk-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1.1rem;
  background: #e8eef5;
  border-bottom: 1px solid rgba(8, 66, 152, 0.12);
}

.firmalar-page .sk-table-toolbar {
  justify-content: space-between;
}

.sk-table-toolbar--end {
  justify-content: flex-end;
}

.sk-satis-chips--stack {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 8.5rem;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}

.sk-satis-chips--stack .sk-chip {
  display: flex;
  flex: 1 1 0;
  width: 100%;
}

.sk-satis-chips--stack .sk-chip__ui {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  min-height: 2.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
}

/* Durum/Program ile sağ blok satır aralığını eşitle */
.firmalar-page .sk-filter-row--top .sk-col-status .mb-3 {
  margin-bottom: 0.5rem !important;
}

.sk-saat-toggle {
  padding: 0.2rem 0;
}

.sk-saat-toggle .form-check-input {
  margin-top: 0.2rem;
}

.firmalar-page .sk-saat-toggle .form-check-label {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: normal;
  color: #495057;
  cursor: pointer;
  user-select: none;
}

.firmalar-page .sk-date-time {
  display: none;
}

.firmalar-page.firmalar-page--show-time .sk-date-time {
  display: inline;
}

.sk-table {
  font-size: 0.8125rem;
}

.sk-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #495057;
  background: #e9ecef !important;
  border-bottom: 2px solid #dee2e6 !important;
  white-space: nowrap;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.sk-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none !important;
  border-radius: 0.25rem;
  padding: 0.1rem 0.2rem;
  margin: -0.1rem -0.2rem;
}

.sk-th-sort:hover {
  color: #084298;
  background: rgba(8, 66, 152, 0.08);
}

.sk-th-chev {
  font-size: 0.65rem;
  opacity: 0.85;
  min-width: 0.6rem;
}

.sk-col-actions {
  min-width: 7.5rem;
  white-space: nowrap;
  vertical-align: middle;
}

.sk-actions {
  flex-wrap: nowrap !important;
}

.sk-row-btn {
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
  white-space: nowrap;
}

.sk-row-form {
  display: inline-flex !important;
  vertical-align: middle;
}

.sk-tr--alt td {
  background-color: #e8ecf1;
}

/* Satış / Takip satırları (SatisAck S,T) — td zeminleri sk-tr--alt ile eziliyordu */
.firmalar-page .sk-table tbody tr.sk-tr--satis td {
  background-color: #c8eec0 !important;
  color: #1a3516;
}

.firmalar-page .sk-table tbody tr.sk-tr--satis:hover td {
  background-color: #bde6b6 !important;
}

.firmalar-page .sk-table tbody tr.sk-tr--takip td {
  background-color: #fff6b8 !important;
  color: #2d2d00;
}

.firmalar-page .sk-table tbody tr.sk-tr--takip:hover td {
  background-color: #f4eeb0 !important;
}

.firmalar-page .sk-table tbody tr.sk-tr--passive td {
  background-color: rgba(255, 231, 228, 0.55) !important;
}

.sk-td-firma {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sk-td-date {
  color: #6c757d;
}

.sk-badge {
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 1.5rem;
}

.sk-empty {
  padding: 3rem 1rem !important;
  background: #f4f6f8;
}

.sk-empty__inner {
  text-align: center;
  max-width: 22rem;
  margin: 0 auto;
}

.sk-empty__icon {
  display: block;
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.35;
}

.sk-pager-bar {
  margin-top: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
}

.sk-pager-bar .sk-pagination .page-link {
  border-radius: 0.4rem;
  margin: 0 0.1rem;
  border: 1px solid #dee2e6;
}

.sk-pagination .page-item.active .page-link {
  background: #084298;
  border-color: #052c65;
}

.sk-page-ellipsis {
  border: none !important;
  background: transparent !important;
}

.navbar.bg-primary {
  background-color: #084298 !important;
}

@media (max-width: 991.98px) {
  .sk-filter-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .firmalar-page .sk-filter-row--top .sk-col-search .row.g-2 {
    max-width: 100%;
  }

  .sk-page-size {
    width: 100%;
    margin-top: 0.5rem;
  }

  .sk-filter-actions > .btn,
  .sk-filter-actions > a.btn {
    flex: 1 1 auto;
    min-height: 2.5rem;
  }

  .sk-pager-bar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .sk-pager-bar nav,
  .sk-pager-bar form {
    width: 100%;
  }

  .sk-pager-bar .btn {
    width: 100%;
  }

  .sk-pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
}

@media (max-width: 767.98px) {
  .sk-table--mobile-cards thead {
    display: none;
  }

  .sk-table--mobile-cards,
  .sk-table--mobile-cards tbody,
  .sk-table--mobile-cards tr,
  .sk-table--mobile-cards td {
    display: block;
    width: 100%;
  }

  .sk-table--mobile-cards tbody tr {
    border: 1px solid #d9e1ea;
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.55rem 0.65rem;
    margin: 0.55rem 0.45rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  }

  .sk-table--mobile-cards tbody tr td {
    border: 0 !important;
    padding: 0.25rem 0;
    white-space: normal;
    text-align: left !important;
  }

  .sk-table--mobile-cards tbody tr td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
  }

  .sk-table--mobile-cards .sk-td-firma {
    max-width: 100%;
    white-space: normal;
  }

  .sk-table--mobile-cards .sk-col-actions .sk-actions {
    display: flex !important;
    width: 100%;
    gap: 0.45rem !important;
    justify-content: stretch !important;
  }

  .sk-table--mobile-cards .sk-col-actions .sk-row-btn,
  .sk-table--mobile-cards .sk-col-actions .sk-row-form {
    flex: 1 1 0;
  }

  .sk-table--mobile-cards .sk-col-actions .sk-row-btn {
    width: 100%;
  }
}