/* ==========================================================================
   Skycon UI — ortak tasarım sistemi (SAP Fiori Horizon)
   Onaylanan standart: https://claude.ai/artifact/NNVnfWTTA98M1gbXsRkKDt
   - Temel değerler horizon-tokens.css (--h-*) üzerine kurulur.
   - Ekranlar kendi renk/buton/başlık stilini YAZMAZ; bu sınıfları ve
     Components/UI bileşenlerini kullanır.
   Kural özeti: tek ana renk (--h-brand); kırmızı/yeşil/turuncu yalnız durum
   ve tutar; Geri butonu başlığın üstünde; başlık solda, aksiyonlar sağ üstte;
   sıra: başlık → filtre → özet → tablo → detay.
   ========================================================================== */

:root {
    --ui-brand: var(--h-brand, #0070f2);
    --ui-brand-hover: var(--h-brand-hover, #0064d9);
    --ui-on-brand: #ffffff;
    --ui-text: var(--h-text, #1d2d3e);
    --ui-text-2: var(--h-text-secondary, #556b82);
    --ui-text-3: var(--h-text-placeholder, #8396a8);
    --ui-page: var(--h-page-bg, #f5f6f7);
    --ui-surface: var(--h-surface, #ffffff);
    --ui-border: var(--h-border, #d9d9d9);
    --ui-hair: var(--h-border-subtle, #eaecee);
    --ui-input: var(--h-border-input, #758ca4);
    --ui-btn-border: #bcc3ca;
    --ui-sel: var(--h-selection-bg, #ebf8ff);
    --ui-hover: #f5f6f7;

    /* Anlamsal durum renkleri (yalnız durum ve tutar için) */
    --ui-pos: #188918;  --ui-pos-bg: #f5fae5;
    --ui-crit: #b44f00; --ui-crit-bg: #fff3e6;
    --ui-neg: #aa0808;  --ui-neg-bg: #ffeaf4;
    --ui-info: #0064d9; --ui-info-bg: #e1f4ff;
    --ui-neu: #556b82;  --ui-neu-bg: #eff1f2;

    --ui-shadow: 0 0 2px rgba(85,107,130,.2), 0 2px 4px rgba(85,107,130,.12);
    --ui-shadow-pop: 0 0 2px rgba(85,107,130,.2), 0 12px 32px rgba(85,107,130,.24);
    --ui-r-card: 12px;
    --ui-r-ctl: 8px;
    --ui-r-chip: 16px;
    --ui-font: var(--h-font, "72", "72full", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif);
    --ui-mono: ui-monospace, "Cascadia Mono", Menlo, monospace;
}

:root[data-theme="dark"],
body.dark-mode {
    --ui-brand: #4db1ff;
    --ui-brand-hover: #7cc6ff;
    --ui-on-brand: #0b1a2a;
    --ui-text: #eaecee;
    --ui-text-2: #a9b4be;
    --ui-text-3: #8396a8;
    --ui-page: #12171c;
    --ui-surface: #1d232a;
    --ui-border: #3a4552;
    --ui-hair: #2a323b;
    --ui-input: #8396a8;
    --ui-btn-border: #5b6773;
    --ui-sel: #1c2f45;
    --ui-hover: #232b33;
    --ui-pos: #5dc122;  --ui-pos-bg: #1f2c17;
    --ui-crit: #ff9a3d; --ui-crit-bg: #33240f;
    --ui-neg: #ff6a6a;  --ui-neg-bg: #3a1820;
    --ui-info: #4db1ff; --ui-info-bg: #13283d;
    --ui-neu: #a9b4be;  --ui-neu-bg: #2a323b;
    --ui-shadow: 0 0 2px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.4);
    --ui-shadow-pop: 0 0 2px rgba(0,0,0,.6), 0 12px 32px rgba(0,0,0,.55);
}

/* ── Sayfa ─────────────────────────────────────────────────────────────── */
.ui-page {
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: 14px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
    min-width: 0;
}
@media (max-width: 600px) { .ui-page { padding: 16px; } }

/* ── Sayfa başlığı (UiPageHeader) ──────────────────────────────────────── */
.ui-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ui-ph-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ui-ph-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ui-ph-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--ui-text); }
.ui-ph-sub { margin: 2px 0 0; color: var(--ui-text-2); font-size: 13px; }
.ui-ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Butonlar ──────────────────────────────────────────────────────────── */
.ui-btn {
    height: 36px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--ui-r-ctl); border: 1px solid transparent;
    font: 600 14px var(--ui-font); white-space: nowrap; cursor: pointer;
    text-decoration: none; transition: background .12s, border-color .12s, color .12s;
    background: var(--ui-surface); color: var(--ui-brand); border-color: var(--ui-btn-border); /* varsayılan = default */
}
.ui-btn i { font-size: 13px; }
.ui-btn:hover { background: var(--ui-hover); color: var(--ui-brand); text-decoration: none; }
.ui-btn:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }
.ui-btn:disabled, .ui-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

.ui-btn--emph { background: var(--ui-brand); color: var(--ui-on-brand); border-color: var(--ui-brand); }
.ui-btn--emph:hover { background: var(--ui-brand-hover); border-color: var(--ui-brand-hover); color: var(--ui-on-brand); }
.ui-btn--ghost { background: transparent; border-color: transparent; }
.ui-btn--ghost:hover { background: var(--ui-hover); }
.ui-btn--neg { color: var(--ui-neg); border-color: var(--ui-neg); }
.ui-btn--neg:hover { background: var(--ui-neg-bg); color: var(--ui-neg); }
.ui-btn--pos { background: var(--ui-pos); color: #fff; border-color: var(--ui-pos); }
.ui-btn--pos:hover { filter: brightness(.95); background: var(--ui-pos); color: #fff; }
.ui-btn--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.ui-btn--back { height: 32px; padding: 0 12px 0 10px; font-size: 13px; align-self: flex-start; }

.ui-icon-btn {
    width: 32px; height: 32px; border: 0; border-radius: var(--ui-r-ctl);
    background: transparent; color: var(--ui-text-2); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.ui-icon-btn:hover { background: var(--ui-hover); color: var(--ui-brand); }
.ui-icon-btn--neg:hover { color: var(--ui-neg); background: var(--ui-neg-bg); }
.ui-icon-btn:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 1px; }

/* ── Filtre şeridi ─────────────────────────────────────────────────────── */
.ui-filters {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
    background: var(--ui-surface); border: 1px solid var(--ui-hair);
    border-radius: var(--ui-r-card); padding: 12px 16px;
}
.ui-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ui-field > label, .ui-field-label { font-size: 12px; color: var(--ui-text-2); }
.ui-field--grow { flex: 1 1 220px; }
.ui-input {
    height: 36px; border: 1px solid var(--ui-input); border-radius: var(--ui-r-ctl);
    background: var(--ui-surface); color: var(--ui-text);
    padding: 0 10px; font: 14px var(--ui-font); min-width: 0; width: 100%;
}
textarea.ui-input { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.ui-input:focus { outline: 2px solid var(--ui-brand); outline-offset: -1px; border-color: var(--ui-brand); }
.ui-input.err, .ui-input[aria-invalid="true"] { border-color: var(--ui-neg); }
.ui-field-err { font-size: 12px; color: var(--ui-neg); }

.ui-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ui-chip {
    height: 28px; padding: 0 12px; border-radius: var(--ui-r-chip);
    border: 1px solid var(--ui-btn-border); background: var(--ui-surface); color: var(--ui-text);
    font: 13px var(--ui-font); cursor: pointer;
}
.ui-chip:hover { border-color: var(--ui-brand); }
.ui-chip.on, .ui-chip[aria-pressed="true"] { background: var(--ui-sel); border-color: var(--ui-brand); color: var(--ui-brand); font-weight: 600; }

.ui-seg { display: inline-flex; border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl); overflow: hidden; }
.ui-seg > button { height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--ui-btn-border); background: var(--ui-surface); color: var(--ui-text); font: 13px var(--ui-font); cursor: pointer; }
.ui-seg > button:last-child { border-right: 0; }
.ui-seg > button.on, .ui-seg > button[aria-pressed="true"] { background: var(--ui-sel); color: var(--ui-brand); font-weight: 600; }

/* ── Özet (KPI) şeridi ─────────────────────────────────────────────────── */
.ui-kpis {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    background: var(--ui-surface); border: 1px solid var(--ui-hair); border-radius: var(--ui-r-card);
    overflow: hidden;
}
.ui-kpi { padding: 14px 18px; min-width: 0; box-shadow: -1px 0 0 var(--ui-hair); }
.ui-kpi-label { font-size: 12px; color: var(--ui-text-2); }
.ui-kpi-value { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; color: var(--ui-text); }
.ui-kpi-sub { font-size: 12px; color: var(--ui-text-3); margin-top: 2px; }

/* Tutar/değer renkleri */
.ui-v--pos { color: var(--ui-pos) !important; }
.ui-v--neg { color: var(--ui-neg) !important; }
.ui-v--crit { color: var(--ui-crit) !important; }
.ui-v--brand { color: var(--ui-brand) !important; }
.ui-muted { color: var(--ui-text-3) !important; }

/* ── Kart / tablo ──────────────────────────────────────────────────────── */
.ui-card { background: var(--ui-surface); border: 1px solid var(--ui-hair); border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow); min-width: 0; }
.ui-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--ui-hair); flex-wrap: wrap; }
.ui-card-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ui-text); }
.ui-card-title small { color: var(--ui-text-2); font-weight: 400; font-size: 15px; }
.ui-card-body { padding: 16px; }

.ui-table-wrap { overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ui-table th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--ui-text-2);
    padding: 10px 16px; border-bottom: 1px solid var(--ui-border); white-space: nowrap; background: var(--ui-surface);
}
/* Sıralanabilir kolon başlığı (her tabloda: th.ui-th-sort + <i class="fas fa-sort|sort-up|sort-down">) */
.ui-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ui-th-sort i { margin-left: 4px; font-size: 10px; color: var(--ui-text-3); }
.ui-th-sort:hover, .ui-th-sort.on, .ui-th-sort.on i { color: var(--ui-brand); }
.ui-table td { padding: 11px 16px; border-bottom: 1px solid var(--ui-hair); color: var(--ui-text); vertical-align: middle; }
.ui-table tbody tr:hover td { background: var(--ui-hover); }
.ui-table tr.ui-clickable { cursor: pointer; }
.ui-table .ui-num { text-align: right; white-space: nowrap; }
.ui-sub { display: block; font-size: 12px; color: var(--ui-text-2); }
.ui-mono { font-family: var(--ui-mono); font-size: 12.5px; color: var(--ui-text-2); }
.ui-table-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; font-size: 13px; color: var(--ui-text-2); }
.ui-table-foot b { color: var(--ui-text); }
.ui-row-actions { display: flex; gap: 2px; justify-content: flex-end; }

.ui-empty { padding: 40px 16px; text-align: center; color: var(--ui-text-2); }
.ui-empty i { display: block; font-size: 28px; color: var(--ui-text-3); margin-bottom: 10px; }

/* ── Durum rozetleri (UiStatus) ve etiket ──────────────────────────────── */
.ui-st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ui-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ui-st--pos { color: var(--ui-pos); background: var(--ui-pos-bg); }
.ui-st--crit { color: var(--ui-crit); background: var(--ui-crit-bg); }
.ui-st--neg { color: var(--ui-neg); background: var(--ui-neg-bg); }
.ui-st--info { color: var(--ui-info); background: var(--ui-info-bg); }
.ui-st--neu { color: var(--ui-neu); background: var(--ui-neu-bg); }
.ui-tag { display: inline-block; height: 22px; line-height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; background: var(--ui-neu-bg); color: var(--ui-text); white-space: nowrap; }
.ui-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--ui-neg); color: #fff; }

/* ── Uyarı şeritleri ───────────────────────────────────────────────────── */
.ui-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--ui-r-ctl); font-size: 13px; border: 1px solid transparent; }
.ui-alert--success { background: var(--ui-pos-bg); color: var(--ui-pos); border-color: color-mix(in srgb, var(--ui-pos) 25%, transparent); }
.ui-alert--error { background: var(--ui-neg-bg); color: var(--ui-neg); border-color: color-mix(in srgb, var(--ui-neg) 25%, transparent); }
.ui-alert--info { background: var(--ui-info-bg); color: var(--ui-info); border-color: color-mix(in srgb, var(--ui-info) 25%, transparent); }
.ui-alert--warn { background: var(--ui-crit-bg); color: var(--ui-crit); border-color: color-mix(in srgb, var(--ui-crit) 25%, transparent); }

/* ── Pop-up (UiDialog) — dışarı tıklamayla kapanmaz ────────────────────── */
.ui-dlg-backdrop { position: fixed; inset: 0; background: rgba(15,29,45,.4); z-index: 1000; }
.ui-dlg-wrap { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: var(--ui-font); color: var(--ui-text); }
.ui-dlg { width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--ui-surface); border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow-pop); overflow: hidden; }
.ui-dlg--lg { width: min(820px, 100%); }
.ui-dlg--sm { width: min(440px, 100%); }
.ui-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--ui-hair); }
.ui-dlg-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--ui-text); }
.ui-dlg-body { padding: 18px 20px; overflow-y: auto; font-size: 14px; }
.ui-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--ui-hair); }
.ui-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ui-form-grid .ui-col-2 { grid-column: 1 / -1; }
.ui-req::after { content: " *"; color: var(--ui-neg); }
@media (max-width: 560px) { .ui-form-grid { grid-template-columns: 1fr; } }

/* ── İlerleme çubuğu ───────────────────────────────────────────────────── */
.ui-progress { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.ui-progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--ui-neu-bg); overflow: hidden; }
.ui-progress-fill { height: 100%; border-radius: 3px; background: var(--ui-brand); }
.ui-progress-text { font-size: 12px; color: var(--ui-text-2); white-space: nowrap; }

/* ── Gri zemin: ortak şablona taşınmış sayfalarda içerik alanı ─────────── */
.sk-app-content:has(.ui-page) { background: var(--ui-page); }

/* ── Modül sayfası (onaylı "B · Çalışma alanı" şablonu) ────────────────────
   <div class="ui-page ui-page--module">
     <UiModuleHeader ...> (beyaz bant: Geri, başlık, aksiyon, özet sayıları)
     <div class="ui-mod-body"> uygulama listesi + yan panel </div>          */
.ui-page--module { padding: 0; gap: 0; min-height: 100%; }
.ui-mod-head { background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair); padding: 16px 24px 0; display: flex; flex-direction: column; gap: 12px; }
.ui-mod-titlerow { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ui-mod-head.no-kpis { padding-bottom: 16px; }
.ui-mod-kpis {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-top: 1px solid var(--ui-hair); margin-left: -18px; overflow: hidden;
}
.ui-mod-kpis .ui-kpi { padding: 12px 18px 14px; box-shadow: -1px 0 0 var(--ui-hair); }
.ui-meter { height: 4px; border-radius: 2px; background: var(--ui-neu-bg); margin-top: 6px; overflow: hidden; }
.ui-meter > i { display: block; height: 100%; border-radius: 2px; background: var(--ui-brand); }

.ui-mod-body { padding: 18px 24px 28px; display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ui-mod-body--single { grid-template-columns: minmax(0, 1fr); }
.ui-mod-body--single .ui-applist-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 960px) { .ui-mod-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .ui-mod-head { padding: 14px 16px 0; } .ui-mod-body { padding: 14px 16px 24px; } }

/* Uygulama listesi (UiAppList / UiAppLink) */
.ui-applist-items { list-style: none; margin: 0; padding: 6px; }
.ui-app {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 10px; border-radius: var(--ui-r-ctl); text-decoration: none; color: var(--ui-text);
}
.ui-app:hover { background: var(--ui-hover); color: var(--ui-text); text-decoration: none; }
.ui-app:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: -2px; }
.ui-app-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--ui-info-bg); color: var(--ui-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ui-app-title { display: block; font-size: 14px; font-weight: 700; }
.ui-app-desc { display: block; font-size: 12px; color: var(--ui-text-2); }
.ui-app-end { display: inline-flex; align-items: center; gap: 8px; color: var(--ui-text-3); font-size: 12px; }
.ui-card-head a.ui-link, .ui-link { font-size: 13px; color: var(--ui-brand); text-decoration: none; }
.ui-link:hover { text-decoration: underline; }
/* Özet sayısı yoksa (rol/dönem nedeniyle) boş şerit gösterme */
.ui-mod-kpis:not(:has(.ui-kpi)) { display: none; }
.ui-mod-head:not(:has(.ui-kpi)) { padding-bottom: 16px; }

/* ══════════════════════════════════════════════════════════════════════════
   KÖPRÜ: eski ortak "sk-emp-*" sınıf ailesi → yeni standart
   (21 ekran bu aileyi kullanıyor; burada tek yerden Fiori standardına bağlanır.)
   ":is(html, body.dark-mode)" öneki app.css'teki koyu tema kurallarından güçlü
   olsun diye; renkler token üzerinden her iki temada da doğru gelir.
   ══════════════════════════════════════════════════════════════════════════ */
.sk-app-content:has(.sk-emp-header) { background: var(--ui-page); }

:is(html, body.dark-mode) .sk-emp-header {
    background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair);
    padding: 16px 24px; align-items: flex-end; font-family: var(--ui-font);
}
:is(html, body.dark-mode) .sk-emp-header:has(+ .sk-emp-toolbar),
:is(html, body.dark-mode) .sk-emp-header:has(+ .sk-emp-tabs) { border-bottom: 0; padding-bottom: 6px; }
:is(html, body.dark-mode) .sk-emp-header-left { flex-direction: column; align-items: flex-start; gap: 10px; }
:is(html, body.dark-mode) .sk-emp-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ui-text); }
:is(html, body.dark-mode) .sk-emp-subtitle { font-size: 13px; color: var(--ui-text-2); margin-top: 2px; }

/* Eski ikonlu geri butonu kalmışsa da standart görünsün */
:is(html, body.dark-mode) .sk-emp-back {
    width: auto; height: 32px; padding: 0 12px 0 10px; gap: 6px;
    background: var(--ui-surface); color: var(--ui-brand); border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl);
    font: 600 13px var(--ui-font); text-decoration: none;
}
:is(html, body.dark-mode) .sk-emp-back:hover { background: var(--ui-hover); color: var(--ui-brand); border-color: var(--ui-btn-border); }

/* Butonlar */
:is(html, body.dark-mode) .sk-emp-btn { border-radius: var(--ui-r-ctl); font: 600 14px var(--ui-font); }
:is(html, body.dark-mode) .sk-emp-btn.primary { background: var(--ui-brand); color: var(--ui-on-brand); border-color: var(--ui-brand); }
:is(html, body.dark-mode) .sk-emp-btn.primary:hover { background: var(--ui-brand-hover); border-color: var(--ui-brand-hover); box-shadow: none; }
:is(html, body.dark-mode) .sk-emp-btn.ghost { background: var(--ui-surface); color: var(--ui-brand); border-color: var(--ui-btn-border); }
:is(html, body.dark-mode) .sk-emp-btn.ghost:hover { background: var(--ui-hover); color: var(--ui-brand); border-color: var(--ui-btn-border); }
:is(html, body.dark-mode) .sk-emp-btn:disabled { opacity: .45; }
:is(html, body.dark-mode) .sk-emp-bulk-btn { background: var(--ui-surface); color: var(--ui-brand); border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl); }
:is(html, body.dark-mode) .sk-emp-bulk-btn.danger { color: var(--ui-neg); border-color: var(--ui-neg); background: var(--ui-surface); }
:is(html, body.dark-mode) .sk-emp-bulk-count { color: var(--ui-brand); }

/* Sekmeler: başlık bandının devamı */
:is(html, body.dark-mode) .sk-emp-tabs { background: var(--ui-surface); margin: 0; padding: 0 24px; border-bottom: 1px solid var(--ui-hair); }
:is(html, body.dark-mode) .sk-emp-tab { color: var(--ui-text-2); font-family: var(--ui-font); }
:is(html, body.dark-mode) .sk-emp-tab:hover { color: var(--ui-text); }
:is(html, body.dark-mode) .sk-emp-tab.is-active { color: var(--ui-brand); border-bottom-color: var(--ui-brand); font-weight: 600; }
:is(html, body.dark-mode) .sk-emp-tab-count { background: var(--ui-neu-bg); color: var(--ui-text-2); }
:is(html, body.dark-mode) .sk-emp-tab.is-active .sk-emp-tab-count { background: var(--ui-info-bg); color: var(--ui-brand); }

/* Filtre çubuğu: beyaz şerit (başlık bandının altında) */
:is(html, body.dark-mode) .sk-emp-toolbar { background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair); padding: 12px 24px 14px; font-family: var(--ui-font); }
:is(html, body.dark-mode) .sk-emp-toolbar .filter-group label { font-size: 12px; font-weight: 400; color: var(--ui-text-2); text-transform: none; letter-spacing: 0; }
:is(html, body.dark-mode) .sk-emp-adv-filters { background: var(--ui-surface); padding: 0 24px 14px; border-bottom: 1px solid var(--ui-hair); }
:is(html, body.dark-mode) .sk-emp-sort,
:is(html, body.dark-mode) .sk-emp-search-input,
:is(html, body.dark-mode) .sk-emp-adv-select {
    background: var(--ui-surface); color: var(--ui-text); border: 1px solid var(--ui-input);
    border-radius: var(--ui-r-ctl); font-family: var(--ui-font); font-size: 14px;
}
:is(html, body.dark-mode) .sk-emp-sort:focus,
:is(html, body.dark-mode) .sk-emp-search-input:focus,
:is(html, body.dark-mode) .sk-emp-adv-select:focus { outline: 2px solid var(--ui-brand); outline-offset: -1px; border-color: var(--ui-brand); box-shadow: none; }
:is(html, body.dark-mode) .sk-emp-filter-btn { background: var(--ui-surface); color: var(--ui-brand); border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl); }
:is(html, body.dark-mode) .sk-emp-filter-btn.is-active { background: var(--ui-sel); border-color: var(--ui-brand); color: var(--ui-brand); }
:is(html, body.dark-mode) .sk-emp-result-bar { color: var(--ui-text-2); }
:is(html, body.dark-mode) .sk-emp-clear-link { background: transparent; border: 0; color: var(--ui-brand); text-decoration: underline; padding: 0; }

/* Liste kartı ve tablo */
:is(html, body.dark-mode) .sk-emp-list {
    margin: 16px 24px 24px; background: var(--ui-surface); border: 1px solid var(--ui-hair);
    border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow); font-family: var(--ui-font);
}
:is(html, body.dark-mode) .sk-emp-table { font-size: 14px; font-variant-numeric: tabular-nums; }
:is(html, body.dark-mode) .sk-emp-table thead th { background: var(--ui-surface); color: var(--ui-text-2); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--ui-border); }
:is(html, body.dark-mode) .sk-emp-table tbody tr { border-bottom: 1px solid var(--ui-hair); }
:is(html, body.dark-mode) .sk-emp-table tbody tr:hover { background: var(--ui-hover); }
:is(html, body.dark-mode) .sk-emp-table tbody td { color: var(--ui-text); }
:is(html, body.dark-mode) .sk-emp-name { color: var(--ui-brand); }
:is(html, body.dark-mode) .sk-emp-sub,
:is(html, body.dark-mode) .sk-emp-twoline span { color: var(--ui-text-2); }
:is(html, body.dark-mode) .sk-emp-twoline strong { color: var(--ui-text); }
:is(html, body.dark-mode) .sk-emp-level { background: var(--ui-neu-bg); color: var(--ui-text); border-radius: 4px; }
:is(html, body.dark-mode) .sk-emp-mini-avatar { background: var(--ui-brand); color: var(--ui-on-brand); }
:is(html, body.dark-mode) .sk-emp-empty { color: var(--ui-text-2); }
:is(html, body.dark-mode) .sk-emp-muted { color: var(--ui-text-3); }

/* Durum rozeti: standart rozet biçimi (renk sayfadan inline geliyorsa korunur) */
:is(html, body.dark-mode) .sk-emp-status { border-radius: 4px; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 600; }
:is(html, body.dark-mode) .sk-emp-status.active { background: var(--ui-pos-bg); color: var(--ui-pos); }
:is(html, body.dark-mode) .sk-emp-status.active .dot { background: var(--ui-pos); }
:is(html, body.dark-mode) .sk-emp-status.inactive { background: var(--ui-neu-bg); color: var(--ui-neu); }
:is(html, body.dark-mode) .sk-emp-status.inactive .dot { background: var(--ui-neu); }

/* Özet kartları (sk-leave-metrics) → tek parça özet şeridi */
:is(html, body.dark-mode) .sk-leave-metrics {
    gap: 0; background: var(--ui-surface); border: 1px solid var(--ui-hair);
    border-radius: var(--ui-r-card); overflow: hidden; font-family: var(--ui-font);
}
:is(html, body.dark-mode) .sk-leave-metric {
    border: 0; border-radius: 0; background: transparent; box-shadow: -1px 0 0 var(--ui-hair); padding: 14px 18px;
}

/* ══════════════════════════════════════════════════════════════════════════
   KÖPRÜ: Bootstrap 5.3 butonları ve form kutuları → yeni standart
   (47 ekran Bootstrap butonu kullanıyor; değişkenler üzerinden tek yerden bağlanır.)
   ══════════════════════════════════════════════════════════════════════════ */
.btn {
    --bs-btn-font-family: var(--ui-font);
    --bs-btn-font-weight: 600;
    --bs-btn-font-size: 14px;
    --bs-btn-border-radius: var(--ui-r-ctl);
    --bs-btn-focus-box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-brand) 35%, transparent);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-sm { --bs-btn-font-size: 13px; --bs-btn-border-radius: var(--ui-r-ctl); }
.btn-lg { --bs-btn-font-size: 15px; --bs-btn-border-radius: var(--ui-r-ctl); }

/* Ana aksiyon */
.btn-primary {
    --bs-btn-color: var(--ui-on-brand); --bs-btn-bg: var(--ui-brand); --bs-btn-border-color: var(--ui-brand);
    --bs-btn-hover-color: var(--ui-on-brand); --bs-btn-hover-bg: var(--ui-brand-hover); --bs-btn-hover-border-color: var(--ui-brand-hover);
    --bs-btn-active-color: var(--ui-on-brand); --bs-btn-active-bg: var(--ui-brand-hover); --bs-btn-active-border-color: var(--ui-brand-hover);
    --bs-btn-disabled-color: var(--ui-on-brand); --bs-btn-disabled-bg: var(--ui-brand); --bs-btn-disabled-border-color: var(--ui-brand);
}
/* İkincil (Fiori default): beyaz zemin, mavi yazı */
.btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-outline, .btn-info {
    --bs-btn-color: var(--ui-brand); --bs-btn-bg: var(--ui-surface); --bs-btn-border-color: var(--ui-btn-border);
    --bs-btn-hover-color: var(--ui-brand); --bs-btn-hover-bg: var(--ui-hover); --bs-btn-hover-border-color: var(--ui-btn-border);
    --bs-btn-active-color: var(--ui-brand); --bs-btn-active-bg: var(--ui-sel); --bs-btn-active-border-color: var(--ui-brand);
    --bs-btn-disabled-color: var(--ui-brand); --bs-btn-disabled-bg: var(--ui-surface); --bs-btn-disabled-border-color: var(--ui-btn-border);
}
/* Olumlu (Onayla vb.) */
.btn-success {
    --bs-btn-color: #fff; --bs-btn-bg: var(--ui-pos); --bs-btn-border-color: var(--ui-pos);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: color-mix(in srgb, var(--ui-pos) 88%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--ui-pos) 88%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--ui-pos) 80%, #000); --bs-btn-disabled-bg: var(--ui-pos); --bs-btn-disabled-border-color: var(--ui-pos);
}
/* Olumsuz (Reddet, Sil): kırmızı çerçeve */
.btn-danger, .btn-outline-danger {
    --bs-btn-color: var(--ui-neg); --bs-btn-bg: var(--ui-surface); --bs-btn-border-color: var(--ui-neg);
    --bs-btn-hover-color: var(--ui-neg); --bs-btn-hover-bg: var(--ui-neg-bg); --bs-btn-hover-border-color: var(--ui-neg);
    --bs-btn-active-color: var(--ui-neg); --bs-btn-active-bg: var(--ui-neg-bg); --bs-btn-active-border-color: var(--ui-neg);
    --bs-btn-disabled-color: var(--ui-neg); --bs-btn-disabled-bg: var(--ui-surface); --bs-btn-disabled-border-color: var(--ui-neg);
}
/* Dikkat (Geri al vb.): turuncu çerçeve */
.btn-warning, .btn-outline-warning {
    --bs-btn-color: var(--ui-crit); --bs-btn-bg: var(--ui-surface); --bs-btn-border-color: var(--ui-crit);
    --bs-btn-hover-color: var(--ui-crit); --bs-btn-hover-bg: var(--ui-crit-bg); --bs-btn-hover-border-color: var(--ui-crit);
    --bs-btn-active-color: var(--ui-crit); --bs-btn-active-bg: var(--ui-crit-bg); --bs-btn-active-border-color: var(--ui-crit);
    --bs-btn-disabled-color: var(--ui-crit); --bs-btn-disabled-bg: var(--ui-surface); --bs-btn-disabled-border-color: var(--ui-crit);
}
.btn-link { --bs-btn-color: var(--ui-brand); --bs-btn-hover-color: var(--ui-brand-hover); --bs-btn-font-weight: 600; }

/* Form kutuları */
.form-control, .form-select {
    border-color: var(--ui-input); border-radius: var(--ui-r-ctl);
    background-color: var(--ui-surface); color: var(--ui-text); font-family: var(--ui-font);
}
.form-control:focus, .form-select:focus {
    border-color: var(--ui-brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-brand) 25%, transparent);
}
.form-check-input:checked { background-color: var(--ui-brand); border-color: var(--ui-brand); }
.form-label { color: var(--ui-text); font-weight: 600; font-size: 13px; }

/* Yükleniyor göstergesi */
.spinner-border.text-primary { color: var(--ui-brand) !important; }

/* ── Eski yapılı iç ekranlar için sayfa kabı ─────────────────────────────
   Başlık/sekme/filtre bantları tam genişlik; diğer içerik 24px içeriden.  */
.ui-legacy-page { font-family: var(--ui-font); color: var(--ui-text); padding-bottom: 24px; font-variant-numeric: tabular-nums; }
.sk-app-content:has(.ui-legacy-page) { background: var(--ui-page); }
.ui-legacy-page > :not(.sk-emp-header):not(.sk-emp-tabs):not(.sk-emp-toolbar):not(.sk-emp-adv-filters):not(.ui-mod-head):not(style):not(script) { margin-left: 24px; margin-right: 24px; }
.ui-legacy-page > :is(.sk-emp-toolbar, .sk-emp-tabs, .sk-emp-header, .ui-mod-head) + :not(.sk-emp-tabs):not(.sk-emp-toolbar):not(.sk-emp-adv-filters) { margin-top: 16px; }
@media (max-width: 600px) { .ui-legacy-page > :not(.sk-emp-header):not(.sk-emp-tabs):not(.sk-emp-toolbar):not(.sk-emp-adv-filters):not(.ui-mod-head):not(style):not(script) { margin-left: 16px; margin-right: 16px; } }

/* ── KÖPRÜ: eski geri butonu sınıfları (btn-back ve türevleri) → standart Geri ──
   Sayfaların kendi kopyalarından (scoped/inline) güçlü olsun diye :is() öneki. */
:is(html, body.dark-mode) :is(a, button):is(.btn-back, .btn-back-standalone, .btn-back-inline, .btn-back-blue, .back-button, .back-btn) {
    height: 32px; padding: 0 12px 0 10px; display: inline-flex; align-items: center; gap: 6px;
    background: var(--ui-surface); color: var(--ui-brand); border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl);
    font: 600 13px var(--ui-font); text-decoration: none; box-shadow: none; transform: none; white-space: nowrap; align-self: flex-start;
}
:is(html, body.dark-mode) :is(a, button):is(.btn-back, .btn-back-standalone, .btn-back-inline, .btn-back-blue, .back-button, .back-btn):hover {
    background: var(--ui-hover); color: var(--ui-brand); border-color: var(--ui-btn-border); box-shadow: none; transform: none;
}
:is(html, body.dark-mode) :is(a, button):is(.btn-back, .btn-back-standalone, .btn-back-inline, .btn-back-blue, .back-button, .back-btn) i { font-size: 12px; }

/* ── KÖPRÜ: "standalone" rapor kalıbı (19 ekran) → standart başlık + filtre bandı ── */
.sk-app-content:has(.standalone-header) { background: var(--ui-page); }
:is(html, body.dark-mode) .reports-container.standalone-mode { background: var(--ui-page); }
:is(html, body.dark-mode) .standalone-header {
    padding: 16px 24px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair);
    flex-direction: column; align-items: flex-start; gap: 10px; font-family: var(--ui-font);
}
:is(html, body.dark-mode) .standalone-header:has(+ .standalone-filters) { border-bottom: 0; padding-bottom: 6px; }
:is(html, body.dark-mode) .standalone-report-title h2 { font: 700 22px/1.25 var(--ui-font); letter-spacing: -.01em; color: var(--ui-text); margin: 0; }
:is(html, body.dark-mode) .standalone-report-title h2 > i:first-child { display: none; }
:is(html, body.dark-mode) .standalone-report-title p { font-size: 13px; color: var(--ui-text-2); margin: 2px 0 0; }
:is(html, body.dark-mode) .standalone-filters { padding: 12px 24px 14px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair); font-family: var(--ui-font); }
:is(html, body.dark-mode) .standalone-filters .filter-group label { font-size: 12px; font-weight: 400; color: var(--ui-text-2); text-transform: none; letter-spacing: 0; }
:is(html, body.dark-mode) .standalone-filters .filter-input {
    height: 36px; border: 1px solid var(--ui-input); border-radius: var(--ui-r-ctl);
    background: var(--ui-surface); color: var(--ui-text); font: 14px var(--ui-font);
}
:is(html, body.dark-mode) .standalone-filters .filter-input:focus { outline: 2px solid var(--ui-brand); outline-offset: -1px; border-color: var(--ui-brand); box-shadow: none; }
/* standalone başlık: Geri üstte; başlık solda, varsa aksiyonlar sağda (grid) */
:is(html, body.dark-mode) .standalone-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 10px; align-items: end; }
:is(html, body.dark-mode) .standalone-header > :is(.btn-back-standalone, .btn-back) { grid-column: 1 / -1; justify-self: start; }
:is(html, body.dark-mode) .standalone-header > .standalone-report-title { grid-column: 1; min-width: 0; }
:is(html, body.dark-mode) .standalone-header > :not(.btn-back-standalone):not(.btn-back):not(.standalone-report-title) { grid-column: 2; justify-self: end; display: flex; gap: 8px; flex-wrap: wrap; }

/* Kart içindeki filtre çubuğu: ayrı kutu değil, kartın üst şeridi */
.ui-card > .ui-filters { border: 0; border-bottom: 1px solid var(--ui-hair); border-radius: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   SOL MENÜLÜ EKRAN (ui-split): başlık bandı altında solda bölüm menüsü,
   sağda içerik. Kaynak Raporları, Yönetim vb.
   <div class="ui-page ui-page--module"><UiModuleHeader .../>
     <div class="ui-split"><nav class="ui-sidenav">…ui-sidenav-item…</nav>
       <div class="ui-split-main">…</div></div></div>
   ══════════════════════════════════════════════════════════════════════════ */
.ui-split { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 24px 28px; }
.ui-split-main { min-width: 0; }
.ui-sidenav {
    position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
    background: var(--ui-surface); border: 1px solid var(--ui-hair); border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow);
    font-family: var(--ui-font);
}
.ui-sidenav-item {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 12px;
    border: 0; border-radius: var(--ui-r-ctl); background: transparent; color: var(--ui-text);
    font: 14px/1.3 var(--ui-font); text-align: left; text-decoration: none; cursor: pointer;
}
.ui-sidenav-item i { width: 16px; text-align: center; color: var(--ui-text-2); font-size: 13px; flex: none; }
.ui-sidenav-item:hover { background: var(--ui-hover); color: var(--ui-text); text-decoration: none; }
.ui-sidenav-item:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: -2px; }
.ui-sidenav-item.is-active { background: var(--ui-sel); color: var(--ui-brand); font-weight: 600; }
.ui-sidenav-item.is-active i { color: var(--ui-brand); }
.ui-sidenav-item.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ui-brand); }
@media (max-width: 900px) {
    .ui-split { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .ui-sidenav { position: static; flex-direction: row; overflow-x: auto; }
    .ui-sidenav-item { width: auto; white-space: nowrap; }
    .ui-sidenav-item.is-active::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 3px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   KÖPRÜ: Yönetim alt ekranları (Management/*: management-content-card ailesi)
   26 bileşen aynı sınıfları kullanıyor; .ui-mgmt sarmalayıcısı altında standarda bağlanır.
   ══════════════════════════════════════════════════════════════════════════ */
:is(html, body.dark-mode) .ui-mgmt { font-family: var(--ui-font); color: var(--ui-text); }
:is(html, body.dark-mode) .ui-mgmt .management-content-card {
    background: var(--ui-surface); border: 1px solid var(--ui-hair); border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow); font-family: var(--ui-font);
}
/* İç içe kart (Aktivite/Proje Ana Verileri alt sekmeleri) çerçevesiz akar */
:is(html, body.dark-mode) .ui-mgmt .management-content-card .management-content-card { border: 0; border-radius: 0; box-shadow: none; }
:is(html, body.dark-mode) .ui-mgmt .content-header { padding: 14px 20px; border-bottom: 1px solid var(--ui-hair); background: var(--ui-surface); gap: 12px; flex-wrap: wrap; }
:is(html, body.dark-mode) .ui-mgmt .content-title { font-size: 18px; font-weight: 700; color: var(--ui-text); letter-spacing: -.01em; margin: 0 0 2px; }
:is(html, body.dark-mode) .ui-mgmt .content-description { font-size: 13px; color: var(--ui-text-2); }
:is(html, body.dark-mode) .ui-mgmt .header-right { gap: 8px; align-items: center; flex-wrap: wrap; }

/* Sayaçlar: hap değil, sade "değer etiket" */
:is(html, body.dark-mode) .ui-mgmt .stat-pill {
    flex-direction: row; align-items: baseline; gap: 4px; min-width: 0; padding: 0 10px; border: 0; border-radius: 0; background: transparent;
    box-shadow: -1px 0 0 var(--ui-hair);
}
:is(html, body.dark-mode) .ui-mgmt .stat-pill:first-child { box-shadow: none; }
:is(html, body.dark-mode) .ui-mgmt .stat-value { font-size: 15px; font-weight: 700; color: var(--ui-text); }
:is(html, body.dark-mode) .ui-mgmt .stat-label { font-size: 12px; color: var(--ui-text-2); text-transform: none; letter-spacing: 0; }

/* Ana aksiyon (Ekle) */
:is(html, body.dark-mode) .ui-mgmt .btn-add {
    height: 36px; padding: 0 14px; gap: 6px; border: 1px solid var(--ui-brand); border-radius: var(--ui-r-ctl);
    background: var(--ui-brand); color: var(--ui-on-brand); font: 600 14px var(--ui-font); text-transform: none; letter-spacing: 0; box-shadow: none;
}
:is(html, body.dark-mode) .ui-mgmt .btn-add:hover { background: var(--ui-brand-hover); border-color: var(--ui-brand-hover); transform: none; box-shadow: none; }

/* Sekmeler */
:is(html, body.dark-mode) .ui-mgmt :is(.tab-navigation-inline, .tab-navigation) { background: var(--ui-surface); padding: 0 20px; border-bottom: 1px solid var(--ui-hair); gap: 4px; }
:is(html, body.dark-mode) .ui-mgmt :is(.tab-btn, .tab-button) {
    background: transparent; color: var(--ui-text-2); border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    padding: 12px 10px 10px; font: 14px var(--ui-font); box-shadow: none;
}
:is(html, body.dark-mode) .ui-mgmt :is(.tab-btn, .tab-button):hover { color: var(--ui-text); background: transparent; }
:is(html, body.dark-mode) .ui-mgmt :is(.tab-btn, .tab-button).active { color: var(--ui-brand); border-bottom-color: var(--ui-brand); font-weight: 600; background: transparent; }

/* Filtre çubuğu */
:is(html, body.dark-mode) .ui-mgmt .filter-bar { background: var(--ui-surface); padding: 12px 20px; border-bottom: 1px solid var(--ui-hair); flex-wrap: wrap; }
:is(html, body.dark-mode) .ui-mgmt :is(.filter-input, .filter-select) {
    height: 36px; border: 1px solid var(--ui-input); border-radius: var(--ui-r-ctl); background-color: var(--ui-surface); color: var(--ui-text); font: 14px var(--ui-font);
}
:is(html, body.dark-mode) .ui-mgmt :is(.filter-input, .filter-select):focus { outline: 2px solid var(--ui-brand); outline-offset: -1px; border-color: var(--ui-brand); box-shadow: none; }
:is(html, body.dark-mode) .ui-mgmt .status-filter-group { background: transparent; padding: 0; border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl); overflow: hidden; gap: 0; }
:is(html, body.dark-mode) .ui-mgmt .status-filter-btn { height: 34px; padding: 0 12px; border-radius: 0; background: var(--ui-surface); color: var(--ui-text); font: 13px var(--ui-font); box-shadow: -1px 0 0 var(--ui-btn-border); }
:is(html, body.dark-mode) .ui-mgmt .status-filter-btn:first-child { box-shadow: none; }
:is(html, body.dark-mode) .ui-mgmt .status-filter-btn.active { background: var(--ui-sel); color: var(--ui-brand); font-weight: 600; }

/* Tablo */
:is(html, body.dark-mode) .ui-mgmt .data-table { font-size: 14px; font-variant-numeric: tabular-nums; }
:is(html, body.dark-mode) .ui-mgmt .data-table thead th {
    background: var(--ui-surface); color: var(--ui-text-2); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0;
    padding: 10px 16px; border-bottom: 1px solid var(--ui-border);
}
:is(html, body.dark-mode) .ui-mgmt .data-table thead th:first-child,
:is(html, body.dark-mode) .ui-mgmt .data-table tbody td:first-child { padding-left: 20px; }
:is(html, body.dark-mode) .ui-mgmt .data-table thead th:last-child,
:is(html, body.dark-mode) .ui-mgmt .data-table tbody td:last-child { padding-right: 20px; }
:is(html, body.dark-mode) .ui-mgmt .data-table tbody td { padding: 10px 16px; color: var(--ui-text); border-bottom: 1px solid var(--ui-hair); background: transparent; }
:is(html, body.dark-mode) .ui-mgmt .data-table tbody tr { background: var(--ui-surface); }
:is(html, body.dark-mode) .ui-mgmt .data-table tbody tr:hover { background: var(--ui-hover); }
:is(html, body.dark-mode) .ui-mgmt .item-name-text { color: var(--ui-text); font-weight: 600; }
:is(html, body.dark-mode) .ui-mgmt :is(.table-footer, .footer-count) { color: var(--ui-text-2); font-size: 13px; background: var(--ui-surface); }

/* Satır ikon butonları */
:is(html, body.dark-mode) .ui-mgmt .btn-icon {
    width: 32px; height: 32px; border: 0; border-radius: var(--ui-r-ctl); background: transparent; color: var(--ui-text-2); opacity: 1; box-shadow: none;
}
:is(html, body.dark-mode) .ui-mgmt .btn-icon:hover { background: var(--ui-hover); color: var(--ui-brand); transform: none; box-shadow: none; border: 0; }
:is(html, body.dark-mode) .ui-mgmt :is(.btn-deactivate, .btn-delete):hover { background: var(--ui-neg-bg); color: var(--ui-neg); }
:is(html, body.dark-mode) .ui-mgmt .btn-activate:hover { background: var(--ui-pos-bg); color: var(--ui-pos); }

/* Pop-up pencereler */
:is(html, body.dark-mode) .ui-mgmt :is(.modal-backdrop, .nested-modal-backdrop) { background: rgba(15, 29, 45, .4); backdrop-filter: none; }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-content, .nested-modal-content) {
    background: var(--ui-surface); border: 0; border-radius: var(--ui-r-card); box-shadow: var(--ui-shadow-pop); font-family: var(--ui-font); color: var(--ui-text);
}
:is(html, body.dark-mode) .ui-mgmt :is(.modal-header, .nested-modal-header) { background: var(--ui-surface); padding: 14px 20px; border-bottom: 1px solid var(--ui-hair); }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-header, .nested-modal-header) :is(h2, h3, h4, h5) { font-size: 16px; font-weight: 700; color: var(--ui-text); }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-body, .nested-modal-body) { padding: 18px 20px; }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-footer, .nested-modal-footer) { background: var(--ui-surface); padding: 12px 20px; border-top: 1px solid var(--ui-hair); gap: 8px; }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-close, .nested-modal-close) { width: 32px; height: 32px; border: 0; border-radius: var(--ui-r-ctl); background: transparent; color: var(--ui-text-2); }
:is(html, body.dark-mode) .ui-mgmt :is(.modal-close, .nested-modal-close):hover { background: var(--ui-hover); color: var(--ui-brand); }
:is(html, body.dark-mode) .ui-mgmt .form-label { font-size: 12px; font-weight: 400; color: var(--ui-text-2); text-transform: none; letter-spacing: 0; }
:is(html, body.dark-mode) .ui-mgmt :is(.form-control, .form-input, .form-select) {
    min-height: 36px; border: 1px solid var(--ui-input); border-radius: var(--ui-r-ctl); background-color: var(--ui-surface); color: var(--ui-text); font: 14px var(--ui-font);
}
:is(html, body.dark-mode) .ui-mgmt :is(.form-control, .form-input, .form-select):focus { outline: 2px solid var(--ui-brand); outline-offset: -1px; border-color: var(--ui-brand); box-shadow: none; }
:is(html, body.dark-mode) .ui-mgmt .required { color: var(--ui-neg); }
/* Pop-up butonları (bileşenlere özel .btn-primary / .btn-secondary tanımları) */
:is(html, body.dark-mode) .ui-mgmt :is(.modal-footer, .nested-modal-footer) :is(.btn-primary, .btn-save) {
    height: 36px; padding: 0 16px; border: 1px solid var(--ui-brand); border-radius: var(--ui-r-ctl); background: var(--ui-brand); color: var(--ui-on-brand); font: 600 14px var(--ui-font); box-shadow: none; transform: none;
}
:is(html, body.dark-mode) .ui-mgmt :is(.modal-footer, .nested-modal-footer) :is(.btn-secondary, .btn-cancel) {
    height: 36px; padding: 0 16px; border: 1px solid var(--ui-btn-border); border-radius: var(--ui-r-ctl); background: var(--ui-surface); color: var(--ui-brand); font: 600 14px var(--ui-font); box-shadow: none; transform: none;
}
:is(html, body.dark-mode) .ui-mgmt .alert-success { background: var(--ui-pos-bg); color: var(--ui-pos); border: 1px solid color-mix(in srgb, var(--ui-pos) 25%, transparent); border-radius: var(--ui-r-ctl); }
:is(html, body.dark-mode) .ui-mgmt .alert-danger { background: var(--ui-neg-bg); color: var(--ui-neg); border: 1px solid color-mix(in srgb, var(--ui-neg) 25%, transparent); border-radius: var(--ui-r-ctl); }

/* Seçenek listesi (pop-up içinde tek seçim) */
.ui-radio-list { display: flex; flex-direction: column; border: 1px solid var(--ui-hair); border-radius: var(--ui-r-ctl); overflow: hidden; }
.ui-radio-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; margin: 0; cursor: pointer; font-size: 14px; color: var(--ui-text); border-bottom: 1px solid var(--ui-hair); }
.ui-radio-opt:last-child { border-bottom: 0; }
.ui-radio-opt:hover { background: var(--ui-hover); }
.ui-radio-opt.on { background: var(--ui-sel); color: var(--ui-brand); font-weight: 600; }
.ui-radio-opt input { accent-color: var(--ui-brand); margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   Başlık bandının altındaki sekmeler (ui-tabs) ve seçenek kartı (ui-optcard)
   <UiModuleHeader .../> <nav class="ui-tabs"><button class="ui-tab is-active">…</button></nav>
   ══════════════════════════════════════════════════════════════════════════ */
.ui-mod-head:has(+ .ui-tabs) { border-bottom: 0; padding-bottom: 4px; }
.ui-tabs { display: flex; gap: 4px; padding: 0 24px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-hair); overflow-x: auto; font-family: var(--ui-font); }
.ui-tab {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px 9px; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: var(--ui-text-2); font: 14px var(--ui-font); cursor: pointer; white-space: nowrap;
}
.ui-tab:hover { color: var(--ui-text); }
.ui-tab.is-active { color: var(--ui-brand); border-bottom-color: var(--ui-brand); font-weight: 600; }
.ui-tab:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: -2px; }

.ui-check { width: 16px; height: 16px; margin: 0; accent-color: var(--ui-brand); cursor: pointer; vertical-align: middle; }
.ui-check:disabled { cursor: not-allowed; }
.ui-table .ui-c { text-align: center; }
.ui-table tr.ui-grp td { background: var(--ui-page); font-size: 13px; font-weight: 700; padding-top: 9px; padding-bottom: 9px; }
.ui-table tr.ui-grp:hover td { background: var(--ui-page); }
.ui-table select.ui-input { height: 30px; font-size: 13px; padding: 0 6px; }

.ui-optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ui-optcard { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--ui-hair); border-radius: var(--ui-r-ctl); cursor: pointer; background: var(--ui-surface); }
.ui-optcard:hover { background: var(--ui-hover); }
.ui-optcard.on { border-color: var(--ui-brand); background: var(--ui-sel); }
.ui-optcard .ui-check { margin-top: 2px; }
.ui-optcard-title { display: block; font-size: 14px; font-weight: 600; color: var(--ui-text); }
.ui-optcard.on .ui-optcard-title { color: var(--ui-brand); }
.ui-optcard-desc { display: block; font-size: 12px; color: var(--ui-text-2); }
.ui-chiplist { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-sidenav-item .ui-sub { margin-top: 1px; }

/* Salt okunur alan listesi (etiket üstte, değer altta) */
.ui-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 24px; }
.ui-fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ui-fld-label { font-size: 12px; color: var(--ui-text-2); }
.ui-fld-value { font-size: 14px; color: var(--ui-text); overflow-wrap: anywhere; }
.ui-fld-value.empty { color: var(--ui-text-3); }
.ui-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ui-info-bg); color: var(--ui-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }

/* ── Koyu tema: açık mavi (brand) zeminli butonlarda koyu yazı (Fiori Horizon koyu tema) ──
   Ekranlar bu butonlarda #fff yazı kullanıyor; koyu temada brand #4db1ff olduğu için okunmuyordu. */
:root[data-theme="dark"] :is(.ui-btn--emph, .h-btn-emph, .sk-emp-btn.primary, .clp-chip.on, .btn-primary, .btn-action.btn-success),
:root[data-theme="dark"] :is(.ui-btn--emph, .h-btn-emph, .sk-emp-btn.primary, .clp-chip.on, .btn-primary, .btn-action.btn-success) :is(span, i, svg) {
    color: var(--ui-on-brand) !important;
}

/* ── Koyu tema: ekranlarda var(--x, yedek) ile kullanılan eski değişkenler (açık temada yedek değer geçerli) ── */
:root[data-theme="dark"],
body.dark-mode {
    --card-bg: var(--ui-surface);
    --hover-bg: var(--ui-hover);
    --primary-color: var(--ui-brand);
    --section-header-bg: var(--ui-hover);
    --border-light: var(--ui-hair);
    --sk-surface: var(--ui-surface);
    --sk-text: var(--ui-text);
    --sk-border: var(--ui-border);
    --sk-hover: var(--ui-hover);
    --input-bg: var(--ui-surface);
    --text-tertiary: var(--ui-text-3);
    --bg-secondary: var(--ui-hover);
}

/* ── Koyu tema: hedefli düzeltmeler ── */
/* Bildirim / zamanlanmış görev sekmeleri: genel bağlantı rengi aktif sekmeyi okunmaz yapıyordu */
/* :not(#_) kimlik ağırlığı ekler: app.css'teki çok seçicili !important bağlantı kuralını geçmek için */
:root[data-theme="dark"] a.admin-nav-item:not(#_) { color: var(--ui-text-2) !important; }
:root[data-theme="dark"] a.admin-nav-item.active:not(#_) { background: var(--ui-brand) !important; color: var(--ui-on-brand) !important; }
/* Filtre düğmeleri: aktif düğmede lacivert yazı koyu zeminde kayboluyordu */
:root[data-theme="dark"] :is(.status-filter-btn, .priority-filter-btn).active:not(#_) { background: var(--ui-sel) !important; color: var(--ui-brand) !important; border-color: var(--ui-brand) !important; }
/* Uygulama kutucuklarındaki sayaç rozeti */
:root[data-theme="dark"] .ui-count { color: #1d232a !important; }
/* Dashboard KPI değişim oranı */
:root[data-theme="dark"] .sk-delta-negative { color: var(--ui-neg) !important; }
:root[data-theme="dark"] .sk-delta-positive { color: var(--ui-pos) !important; }
/* Ofis takip durum önizlemesi: renkler durum tanımından (satır içi) gelir, genel span rengi ezmesin */
:root[data-theme="dark"] .status-preview > span { color: inherit !important; }
/* Gider formu (app.css'teki açık renk alanlar) */
:root[data-theme="dark"] :is(.employee-field, .expense-form-right) { background: var(--ui-hover) !important; border-color: var(--ui-border) !important; }
:root[data-theme="dark"] .employee-field .employee-name,
:root[data-theme="dark"] .activity-item .activity-title { color: var(--ui-text) !important; }
:root[data-theme="dark"] .cancel-button { background: transparent !important; border-color: var(--ui-btn-border) !important; color: var(--ui-text) !important; }
/* Fatura raporu durum kartları, QR yönetimi IP girişi */
:root[data-theme="dark"] .status-card .status-amount:not(#_) { color: var(--ui-text-2) !important; }
:root[data-theme="dark"] .oqy-input:not(#_) { background: var(--ui-surface) !important; color: var(--ui-text) !important; border-color: var(--ui-input) !important; }
/* Yeşil (olumlu) butonlar: koyu temada açık yeşil zemin, koyu yazı */
:root[data-theme="dark"] .btn-success:not(#_) { color: #10210a !important; }
/* Giriş kutuları: koyu temada beyaz kalan metin kutusu / liste / çok satırlı alanlar */
:root[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]), select, textarea):not(#_) {
    background-color: var(--ui-surface) !important;
    color: var(--ui-text) !important;
    border-color: var(--ui-input);
    color-scheme: dark;
}
:root[data-theme="dark"] :is(input, textarea)::placeholder { color: var(--ui-text-3) !important; }
/* Sunucuda üretilen SVG grafiklerdeki lacivert seri rengi (#1a237e) koyu zeminde seçilmiyordu */
:root[data-theme="dark"] svg [stroke="#1a237e"] { stroke: var(--ui-brand); }
:root[data-theme="dark"] svg [fill="#1a237e"] { fill: var(--ui-brand); }
:root[data-theme="dark"] svg stop[style*="#1a237e"] { stop-color: var(--ui-brand) !important; }
