/* Eczboard ortak arayüz katmanı: style.css'ten sonra yüklenir.
   Yalnızca görünüm kuralları içerir; sayfa işleyişine dokunmaz. */
:root {
  --ecz-brand: #f70000;
  --ecz-ink: #16324a;
  --ecz-blue: #487fff;
  --ecz-green: #16a34a;
  --ecz-amber: #f59e0b;
  --ecz-violet: #8252e9;
  --ecz-teal: #0f9f9a;
  --ecz-line: #e3e8ef;
  --ecz-soft: #f6f8fc;
  --ecz-head: #eef3fb;
}
[data-theme=dark] {
  --ecz-ink: #e8eef6;
  --ecz-line: rgba(209, 213, 219, .18);
  --ecz-soft: #222e3e;
  --ecz-head: #2b394c;
}

/* --- Sayfa başlıkları --- */
.dashboard-main-body > :is(h1, h2, h3, h4, h5, h6),
.dashboard-main-body > .d-flex > :is(h1, h2, h3, h4, h5, h6):first-child,
.dashboard-main-body > .d-flex > div:first-child > :is(h1, h2, h3, h4, h5, h6):first-child,
.dashboard-main-body > :is(form, div) > .d-flex.mb-24 > h6.fw-semibold.mb-0:first-child {
  position: relative;
  font-size: 1.375rem !important;
  line-height: 1.35;
  font-weight: 700 !important;
  color: var(--ecz-ink);
  padding-inline-start: .875rem;
}
.dashboard-main-body > :is(h1, h2, h3, h4, h5, h6)::before,
.dashboard-main-body > .d-flex > :is(h1, h2, h3, h4, h5, h6):first-child::before,
.dashboard-main-body > .d-flex > div:first-child > :is(h1, h2, h3, h4, h5, h6):first-child::before,
.dashboard-main-body > :is(form, div) > .d-flex.mb-24 > h6.fw-semibold.mb-0:first-child::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .22em;
  bottom: .22em;
  width: 4px;
  border-radius: 4px;
  background: var(--ecz-brand);
}
.dashboard-main-body > :is(h1, h2, h3, h4, h5, h6) { margin-bottom: 1.25rem; }

/* --- Kartlar --- */
.dashboard-main-body .card { border-radius: 12px; border: 1px solid var(--ecz-line); }
.dashboard-main-body .card > .card-header:first-child { border-radius: 12px 12px 0 0; }
.dashboard-main-body .card > .card-header { background: var(--ecz-soft); border-bottom: 1px solid var(--ecz-line); padding: .875rem 1.25rem; }
.dashboard-main-body .card > .card-header.mb-24 { margin-bottom: 0 !important; }
.dashboard-main-body .card > .card-header :is(h1, h2, h3, h4, h5, h6),
.dashboard-main-body .card-body > :is(h1, h2, h3, h4, h5, h6) {
  font-size: 1.0625rem !important;
  line-height: 1.4;
  font-weight: 600 !important;
  color: var(--ecz-ink);
}
.dashboard-main-body .card-body > :is(h1, h2, h3, h4, h5, h6) { margin-bottom: .75rem; }
.dashboard-main-body .card-body > .btn + :is(h5, h6),
.dashboard-main-body .card-body > form + :is(h5, h6),
.dashboard-main-body .card-body > :is(p, div, ul, table) + :is(h5, h6) { margin-top: 1.5rem; }
.dashboard-main-body .card-body > p { margin-bottom: .5rem; }

/* --- Özet kartları: <col><card><card-body> etiket + değer --- */
.dashboard-main-body .row > [class*=col] > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) {
  --ton: var(--ecz-blue);
  height: 100%;
  border-inline-start: 4px solid var(--ton);
  background: linear-gradient(120deg, color-mix(in srgb, var(--ton) 11%, var(--white)) 0%, var(--white) 62%);
}
.dashboard-main-body .row > [class*=col]:nth-child(6n+2) > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) { --ton: var(--ecz-amber); }
.dashboard-main-body .row > [class*=col]:nth-child(6n+3) > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) { --ton: var(--ecz-brand); }
.dashboard-main-body .row > [class*=col]:nth-child(6n+4) > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) { --ton: var(--ecz-violet); }
.dashboard-main-body .row > [class*=col]:nth-child(6n+5) > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) { --ton: var(--ecz-teal); }
.dashboard-main-body .row > [class*=col]:nth-child(6n) > .card:has(> .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6)) { --ton: var(--ecz-green); }
.dashboard-main-body .card-body > .text-muted:first-child + :is(strong, h3, h4, h5, h6) {
  display: block;
  margin: .25rem 0 0;
  font-size: 1.5rem !important;
  line-height: 1.25;
  font-weight: 700 !important;
  color: var(--ecz-ink);
  font-variant-numeric: tabular-nums;
}

/* --- Düz tablolar --- */
.dashboard-main-body table.table:not(.dataTable):not(.bordered-table) > thead > tr > th {
  background: var(--ecz-head);
  color: var(--ecz-ink);
  font-size: .8125rem;
  font-weight: 600;
  padding: .75rem .875rem;
  border-bottom: 1px solid var(--ecz-line);
  white-space: nowrap;
  vertical-align: middle;
}
.dashboard-main-body table.table:not(.dataTable):not(.bordered-table) > tbody > tr > td {
  padding: .6875rem .875rem;
  border-bottom: 1px solid var(--ecz-line);
  vertical-align: middle;
  color: var(--text-secondary-light);
}
.dashboard-main-body table.table:not(.dataTable) > tbody > tr:last-child > td { border-bottom: 0; }
.dashboard-main-body table.table:not(.dataTable) > tbody > tr:hover > td { background-color: var(--ecz-soft); }
.dashboard-main-body table.table > tbody > tr > td[colspan]:only-child { text-align: center; padding: 1.75rem 1rem !important; color: var(--text-secondary-light); }
.dashboard-main-body > .table-responsive,
.dashboard-main-body > .row > [class*=col] > .table-responsive,
.dashboard-main-body > form > .table-responsive {
  background: var(--white);
  border: 1px solid var(--ecz-line);
  border-radius: 12px;
  overflow-x: auto;
}
.dashboard-main-body > table.table,
.dashboard-main-body > .row > [class*=col] > table.table {
  background: var(--white);
  border: 1px solid var(--ecz-line);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.dashboard-main-body .card > .table-responsive { border-radius: 0 0 12px 12px; }
.dashboard-main-body table.table code { white-space: nowrap; }

/* --- Sekme menüleri --- */
.ecz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  padding: .375rem;
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid var(--ecz-line);
  border-radius: 12px;
}
.ecz-tabs > a {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .875rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-secondary-light);
  transition: background-color .15s, color .15s;
}
.ecz-tabs > a:hover { background: var(--ecz-head); color: var(--ecz-ink); }
.ecz-tabs > a.active { background: var(--ecz-brand); color: #fff; }
.ecz-tabs > a:focus-visible { outline: 2px solid var(--ecz-blue); outline-offset: 2px; }
.ecz-tabs iconify-icon { font-size: 1.05rem; }

/* --- Formlar --- */
.dashboard-main-body textarea.form-control:not([rows="1"]):not(.form-control-sm) { min-height: 5.25rem; }
.dashboard-main-body .form-control:focus,
.dashboard-main-body .form-select:focus { box-shadow: 0 0 0 3px rgba(72, 127, 255, .14); }
.dashboard-main-body input[type=checkbox].form-check-input { flex-shrink: 0; }
.dashboard-main-body .form-check { display: flex; align-items: center; gap: .5rem; padding-inline-start: 0; min-height: 1.5rem; }
.dashboard-main-body .form-check > .form-check-input { float: none; margin: 0; }
.dashboard-main-body details > summary { cursor: pointer; font-weight: 600; color: var(--ecz-ink); padding: .375rem 0; }
.dashboard-main-body .field-validation-valid,
.dashboard-main-body .validation-summary-valid { display: none; }
/* Filtre satırlarında etiketsiz kutular diğer alanlarla aynı hizada dursun */
.dashboard-main-body form.row:has(> [class*=col] > .form-label) > [class*=col]:has(> .form-check):not(:has(> .form-label)) { align-self: end; padding-bottom: .625rem; }

/* --- Düğmeler --- */
.dashboard-main-body .btn { border-radius: 8px !important; }
.dashboard-main-body .btn:has(> iconify-icon) { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; }
.dashboard-main-body .btn:has(> iconify-icon).d-none { display: none !important; }
.dashboard-main-body .btn-outline-danger { background-color: transparent; color: var(--danger-main); }
.dashboard-main-body .btn-outline-danger:hover { background-color: var(--danger-main); color: #fff; }
/* Satır içi beyaz yazı verilmiş kırmızı düğmeler dolu görünür */
.dashboard-main-body .btn-outline-danger:is([style*="color:#fff"], [style*="color: #fff"], .text-white) { background-color: var(--danger-main); }
.dashboard-main-body .btn-outline-secondary { color: var(--text-secondary-light); border-color: #b9c3d0; background: var(--white); }
.dashboard-main-body .btn-outline-secondary:hover { color: var(--ecz-ink); background: var(--ecz-head); }
.dashboard-main-body .btn:focus-visible { outline: 2px solid var(--ecz-blue); outline-offset: 2px; }

/* --- Uyarılar --- */
.dashboard-main-body .alert { border-radius: 12px; border-width: 1px; border-inline-start-width: 4px; font-size: .9375rem; }
.dashboard-main-body .alert-success { border-inline-start-color: var(--ecz-green); }
.dashboard-main-body .alert-info { border-inline-start-color: var(--ecz-blue); background: #eaf2ff; color: #1d4483; border-color: #cfe0ff; }
.dashboard-main-body .alert-warning { border-inline-start-color: var(--ecz-amber); }
.dashboard-main-body .alert-danger { border-inline-start-color: var(--ecz-brand); }
[data-theme=dark] .dashboard-main-body .alert-info { background: rgba(72, 127, 255, .14); color: #cfe0ff; border-color: rgba(72, 127, 255, .35); }
[data-theme=dark] .dashboard-main-body .alert-warning { background: rgba(245, 158, 11, .14); color: #ffe2a8; border-color: rgba(245, 158, 11, .35); }

/* --- Boş durum --- */
.ecz-bos { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2.5rem 1.25rem; text-align: center; }
.ecz-bos img { width: 168px; height: auto; margin-bottom: .5rem; }
.ecz-bos strong { font-size: 1.125rem; color: var(--ecz-ink); }
.ecz-bos p { max-width: 46ch; margin: 0; color: var(--text-secondary-light); }
.ecz-bos .btn { margin-top: .75rem; }

/* --- Tanım listesi (detay ekranları) --- */
.ecz-tanim { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; margin: 0; }
.ecz-tanim > div { padding: .75rem 1rem; background: var(--ecz-soft); border: 1px solid var(--ecz-line); border-radius: 10px; min-width: 0; }
.ecz-tanim dt { font-size: .8125rem; font-weight: 500; color: var(--text-secondary-light); }
.ecz-tanim dd { margin: .125rem 0 0; font-weight: 600; color: var(--ecz-ink); overflow-wrap: anywhere; }

.d-footer p { color: var(--text-secondary-light); font-size: .875rem; }

.ecz-cikti { margin: 1.25rem 0 0; padding: 1rem; max-height: 60vh; overflow: auto; white-space: pre-wrap; background: var(--ecz-soft); color: var(--ecz-ink); border: 1px solid var(--ecz-line); border-radius: 8px; }
.ecz-cikti:empty { display: none; }

/* --- Giriş ekranları --- */
.auth-left.ecz-giris { background: #f70000; }
.ecz-giris__ic { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 3rem clamp(2rem, 6vw, 6rem); color: #fff; }
.ecz-giris__ic img { width: min(100%, 440px); height: auto; margin-bottom: 2rem; }
.ecz-giris__baslik { margin: 0 0 .5rem; font-size: clamp(1.5rem, 2.2vw, 2.125rem); line-height: 1.25; font-weight: 700; color: #fff; text-wrap: balance; }
.ecz-giris__metin { margin: 0; max-width: 44ch; font-size: 1.0625rem; color: #fff; }
.auth-right .btn-primary { background: #f70000; border-color: #f70000; font-size: 1rem !important; }
.auth-right .btn-primary:hover { background: #c40000; border-color: #c40000; }

.ecz-giris-logo img { width: 170px; height: auto; }
.ecz-sayfalama .pagination { display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; list-style: none; }
.ecz-sayfalama .pagination a { display: block; padding: .375rem .75rem; border: 1px solid var(--ecz-line); border-radius: 8px; background: var(--white); }
.ecz-sayfalama .pagination .active a { background: var(--ecz-brand); border-color: var(--ecz-brand); color: #fff; }

/* --- Kampanya kartları --- */
.ecz-kampanya .blog-card { height: 100%; overflow: hidden; }
.ecz-kampanya .blog-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ecz-kampanya > h6 { font-size: 1.375rem !important; color: var(--ecz-ink); border-inline-start: 4px solid var(--ecz-brand); padding-inline-start: .75rem; }

.ecz-iki { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; align-items: start; }
.dashboard-main-body .card-header > .d-flex { align-items: center; flex-wrap: wrap; }
.dashboard-main-body .card-header > .d-flex > .btn { padding-block: .5rem; }
.dashboard-main-body .card-body > hr { margin: 1.75rem 0 1.25rem; border: 0; border-top: 1px solid var(--ecz-line); opacity: 1; }
.dashboard-main-body select[multiple].form-select { height: auto; min-height: 8rem; background-image: none; }
.dashboard-main-body .select2-container--default .select2-selection--multiple { min-height: 44px; padding: 4px 8px; border: 1px solid var(--input-form-light, #d1d5db); border-radius: 8px; background: var(--white); }
.dashboard-main-body .select2-container .select2-search--inline .select2-search__field { min-height: 0; height: 26px; margin: 4px 0 0 4px; padding: 0; border: 0; background: transparent; box-shadow: none; color: inherit; }
@media (min-width: 992px) {
.ecz-sabit-son { overflow: visible !important; }
.ecz-sabit-son > thead > tr > th:last-child,
.ecz-sabit-son > tbody > tr > td:last-child:not(:only-child) { position: sticky; right: 0; z-index: 2; background: var(--white); box-shadow: -8px 0 12px -10px rgba(15, 35, 60, .35); }
.ecz-sabit-son > thead > tr > th:last-child { background: var(--ecz-head); }
/* sticky + transform birlikte uygulaninca islem sutunu iki kat kayiyordu */
.dashboard-main-body table.dataTable.iys-has-sticky-action.iys-action-transform-fallback > :is(thead, tbody) > tr > .iys-sticky-action-col.iys-sticky-action-col.iys-sticky-action-col { position: sticky !important; right: 0 !important; transform: none !important; }
}
.dashboard-main-body .card-header > a.btn { justify-self: end; }
.dashboard-main-body .card-header > .d-flex form > .col-12 { margin-top: 0 !important; }
.ecz-aralik > input { flex: 1 1 130px; width: auto; }
.ecz-tanim dt, .ecz-tanim dd { display: block; }
.ecz-satir { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--ecz-line); list-style: none; }
.ecz-satir:last-child { border-bottom: 0; }
.ecz-satir strong { color: var(--ecz-ink); font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
ul:has(> .ecz-satir) { padding: 0; list-style: none; }
.ecz-kutu { padding: .875rem 1rem; margin-bottom: .75rem; background: var(--ecz-soft); border: 1px solid var(--ecz-line); border-radius: 10px; }
.ecz-paket { border-top: 4px solid var(--ecz-blue) !important; }
.ecz-paket--aktif { border-top-color: var(--ecz-brand) !important; }
.ecz-satis-form > .col-4 { width: auto; float: none !important; }
.ecz-satis-form .btn { white-space: nowrap; }
.dashboard-main-body .card-header .btn { white-space: nowrap; }

/* --- Dar ekran --- */
@media (max-width: 767px) {
  .ecz-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .ecz-tabs > a { flex: 0 0 auto; }
  .dashboard-main-body > :is(h1, h2, h3, h4, h5, h6),
  .dashboard-main-body > .d-flex > :is(h1, h2, h3, h4, h5, h6):first-child { font-size: 1.1875rem !important; }
  .dashboard-main-body .card > .card-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .ecz-tabs > a { transition: none; } }

@media (max-width: 575.98px) {
  .ecz-aralik { flex-direction: column; align-items: stretch; gap: .5rem; }
  .ecz-aralik > span { display: none; }
  .ecz-aralik > input { flex: none; width: 100%; }
}

.dashboard-main-body .select2-container--default .select2-selection--multiple { display: block; width: 100%; }
.dashboard-main-body .select2-container .select2-search--inline, .dashboard-main-body .select2-container .select2-search--inline .select2-search__field { max-width: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; }

/* Koyu tema */
[data-theme=dark] .dashboard-main-body .table { --bs-table-bg: transparent; --bs-table-color: #e8eef6; border-color: var(--ecz-line); }
[data-theme=dark] .dashboard-main-body .table > :not(caption) > .table-warning > *, [data-theme=dark] .dashboard-main-body .table > .table-warning > * > * { --bs-table-bg: transparent; --bs-table-color: #ffe2a8; }
[data-theme=dark] .dashboard-main-body .table tr.table-warning { --bs-table-bg: rgba(245, 158, 11, .16); --bs-table-color: #ffe2a8; color: #ffe2a8; }
[data-theme=dark] .dashboard-main-body .table tr.table-warning > * { background: rgba(245, 158, 11, .16) !important; color: #ffe2a8 !important; }
[data-theme=dark] :is(.dashboard-main-body, .auth) :is(.text-muted, .form-text, small.text-muted) { color: #a9b7c6 !important; }
[data-theme=dark] .dashboard-main-body .dt-paging .dt-paging-button:not(.current) { color: #c5d0dc !important; }
[data-theme=dark] .dashboard-main-body .sponsor-dash-hero :is(h1, h2, h3, h4, h5, h6) { color: #16324a !important; }
[data-theme=dark] .ecz-giris-logo img { padding: 8px 12px; border-radius: 10px; background: #fff; }
[data-theme=dark] .dashboard-main-body .btn-outline-primary:not(:hover):not(.active) { color: #8fb4ff; border-color: #5f86d6; }
.dashboard-main-body .select2-container .select2-selection--multiple .select2-search--inline > textarea.select2-search__field.select2-search__field { height: 30px !important; min-height: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.dashboard-main-body .select2-container--default > .selection > .select2-selection--multiple.select2-selection--multiple { border: 1px solid #d1d5db !important; }
.dashboard-main-body .select2-container > .selection { display: block; width: 100%; }
.dashboard-main-body .select2-container > .selection > .select2-selection { width: 100% !important; max-width: none !important; }
