:root {
    --sidebar-w: 248px;
    /* Göztepe: logodaki kırmızı ve sarı */
    --brand: #dd0b14;
    --brand-koyu: #b8090f;
    --brand-en-koyu: #8e060c;
    --brand-sari: #ffdc01;
    --brand-acik: #fde8e9;
    --sidebar-bg: linear-gradient(180deg, #c40a12 0%, #8e060c 100%);
    --sidebar-hover: rgba(255, 255, 255, .1);
    --page-bg: #f1f5f9;
    --card-radius: 14px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-primary: #dd0b14;
    --bs-primary-rgb: 221, 11, 20;
    --bs-primary-text-emphasis: #8e060c;
    --bs-primary-bg-subtle: #fde8e9;
    --bs-primary-border-subtle: #f6b3b6;
    --bs-link-color: #c40a12;
    --bs-link-color-rgb: 196, 10, 18;
    --bs-link-hover-color: #8e060c;
    --bs-link-hover-color-rgb: 142, 6, 12;
    --bs-focus-ring-color: rgba(221, 11, 20, .25);
}

body { background: var(--page-bg); font-size: .95rem; -webkit-tap-highlight-color: transparent; }
.xsmall { font-size: .75rem; }
.min-w-0 { min-width: 0; }
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary { --bs-btn-bg: #dd0b14; --bs-btn-border-color: #dd0b14; --bs-btn-hover-bg: #b8090f; --bs-btn-hover-border-color: #b8090f; --bs-btn-active-bg: #8e060c; --bs-btn-active-border-color: #8e060c; --bs-btn-disabled-bg: #dd0b14; --bs-btn-disabled-border-color: #dd0b14; --bs-btn-focus-shadow-rgb: 221, 11, 20; }
.btn-outline-primary { --bs-btn-color: #c40a12; --bs-btn-border-color: #dd0b14; --bs-btn-hover-bg: #dd0b14; --bs-btn-hover-border-color: #dd0b14; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #b8090f; --bs-btn-active-border-color: #b8090f; --bs-btn-focus-shadow-rgb: 221, 11, 20; }
.form-control:focus, .form-select:focus { border-color: #f08a8e; box-shadow: 0 0 0 .25rem rgba(221, 11, 20, .15); }
.form-check-input:checked { background-color: #dd0b14; border-color: #dd0b14; }
.form-check-input:focus { border-color: #f08a8e; box-shadow: 0 0 0 .25rem rgba(221, 11, 20, .15); }
.form-switch .form-check-input:focus:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23f08a8e'/%3e%3c/svg%3e"); }
.pagination { --bs-pagination-active-bg: #dd0b14; --bs-pagination-active-border-color: #dd0b14; --bs-pagination-color: #c40a12; --bs-pagination-hover-color: #8e060c; --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(221, 11, 20, .2); }
.nav-pills { --bs-nav-pills-link-active-bg: #dd0b14; }
.progress, .progress-stacked { --bs-progress-bar-bg: #dd0b14; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.card { border: 0; border-radius: var(--card-radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04); }
.card-header { background: transparent; border-bottom: 1px solid #eef2f6; padding: 1rem 1.25rem; font-weight: 600; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; background: #f8fafc; }

/* ---------- Yan menü ---------- */
/* offcanvas-lg masaüstünde arka planı !important ile şeffaf yapar; geri al */
.sidebar, .sidebar.offcanvas-lg { background: var(--sidebar-bg) !important; color: rgba(255, 255, 255, .85); display: flex; flex-direction: column; }
@media (min-width: 992px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1030; }
    .main { margin-left: var(--sidebar-w); }
    body.has-bottom-nav { padding-bottom: 0; }
}
@media (max-width: 991.98px) {
    .sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; background: var(--sidebar-bg); }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.12); position: relative; }
/* Logodaki sarı-kırmızı bölünmeye gönderme: menünün üstünde ince şerit */
.sidebar-brand::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand-sari) 50%, #fff 50%); opacity: .9; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: inline-grid; place-items: center; font-size: 1.05rem; }
.brand-logo { height: 44px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.brand-ad { line-height: 1.15; }
.brand-ad small { display: block; font-weight: 500; font-size: .72rem; color: var(--brand-sari); letter-spacing: .02em; }
.sidebar-nav { padding: .75rem; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-baslik { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 220, 1, .8); padding: 1rem .75rem .4rem; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: .7rem; color: rgba(255, 255, 255, .88); padding: .55rem .75rem; border-radius: 9px; font-size: .9rem; margin-bottom: 2px; }
.sidebar-nav .nav-link i { font-size: 1.05rem; opacity: .85; }
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--brand-sari); color: #5c0408; font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.sidebar-nav .nav-link.active i { opacity: 1; }
.sidebar-nav .nav-link .badge { box-shadow: 0 0 0 2px rgba(0, 0, 0, .12); }
.sidebar-user { display: flex; align-items: center; gap: .5rem; padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-user .avatar { background: rgba(0, 0, 0, .22); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #334155; color: #fff; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 600; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar-light { background: #fff4bf; color: #8e060c; }

/* ---------- İçerik ---------- */
.content { padding: 1.5rem; max-width: 1280px; }
@media (max-width: 991.98px) { .content { padding: 1rem; } }
.sayfa-baslik { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.sayfa-baslik h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.sayfa-baslik .alt { color: #64748b; font-size: .9rem; }

/* ---------- Mobil üst / alt çubuk ---------- */
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: #fff; padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); border-bottom: 3px solid var(--brand); }
.topbar-logo { height: 32px; width: auto; }
body.has-bottom-nav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; background: #fff; border-top: 1px solid #e2e8f0; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; color: #64748b; text-decoration: none; font-size: .68rem; }
.bottom-nav a i { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--brand); font-weight: 600; }
.dot-badge { position: absolute; top: -4px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: .65rem; font-weight: 700; display: inline-grid; place-items: center; }
.bottom-nav .dot-badge { top: 3px; right: calc(50% - 22px); }

/* ---------- Ana sayfa kutucukları ---------- */
.merhaba h1 { font-size: 1.5rem; font-weight: 700; }
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1.25rem .75rem; border-radius: var(--card-radius); text-decoration: none; font-weight: 600; text-align: center; background: color-mix(in srgb, var(--renk) 10%, #fff); color: var(--renk); border: 1px solid color-mix(in srgb, var(--renk) 18%, #fff); transition: transform .12s ease, box-shadow .12s ease; }
.tile i { font-size: 2rem; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--renk) 18%, transparent); color: var(--renk); }
.tile:active { transform: scale(.97); }

.stat { display: flex; align-items: center; gap: .9rem; }
.stat-ikon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-deger { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }

/* ---------- Talep listesi ---------- */
.talep-liste { list-style: none; margin: 0; padding: 0; }
.talep-liste li + li { border-top: 1px solid #eef2f6; }
.talep-satir { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.25rem; color: inherit; text-decoration: none; }
.talep-satir:hover { background: #f8fafc; }
.tur-ikon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; color: var(--renk); background: color-mix(in srgb, var(--renk) 12%, #fff); }
.durum-rozet { font-size: .75rem; font-weight: 600; padding: .35em .7em; border-radius: 999px; white-space: nowrap; }

.sekme-pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.sekme-pills a { white-space: nowrap; padding: .45rem .9rem; border-radius: 999px; background: #fff; color: #475569; text-decoration: none; font-size: .85rem; font-weight: 500; border: 1px solid #e2e8f0; }
.sekme-pills a.active { background: var(--brand-acik); color: var(--brand-en-koyu); border-color: #f6b3b6; }

/* ---------- Onay akışı zaman çizelgesi ---------- */
.akis { list-style: none; padding: 0; margin: 0; position: relative; }
.akis li { position: relative; padding: 0 0 1.25rem 2.5rem; }
.akis li::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: #e2e8f0; }
.akis li:last-child::before { display: none; }
.akis .nokta { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: #f1f5f9; color: #64748b; border: 2px solid #e2e8f0; }
.akis .onaylandi .nokta { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.akis .reddedildi .nokta { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.akis .iade .nokta { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.akis .bekliyor.aktif .nokta { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.akis .atlandi .nokta, .akis .iptal .nokta { opacity: .6; }

/* ---------- Form sihirbazı ---------- */
.adimlar { display: flex; justify-content: space-between; position: relative; margin: 0 auto 1.5rem; max-width: 360px; }
.adimlar::before { content: ''; position: absolute; top: 15px; left: 16px; right: 16px; height: 2px; background: #e2e8f0; }
.adim-gosterge { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .75rem; color: #94a3b8; background: transparent; }
.adim-gosterge span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #e2e8f0; font-weight: 600; }
.adim-gosterge.aktif { color: var(--brand); }
.adim-gosterge.aktif span { border-color: var(--brand); background: var(--brand); color: #fff; }
.adim-gosterge.tamam span { border-color: var(--brand); color: var(--brand); }
.radyo-liste { display: grid; gap: .5rem; }
@media (min-width: 768px) { .radyo-liste { grid-template-columns: repeat(3, 1fr); } }
.radyo-kart { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px solid #e2e8f0; border-radius: 12px; cursor: pointer; background: #fff; margin: 0; }
.radyo-kart:has(input:checked) { border-color: var(--brand); background: #fff5f5; box-shadow: 0 0 0 1px var(--brand); }
.radyo-kart i { font-size: 1.2rem; }
.form-alt-bar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--page-bg) 30%); padding: 1rem 0 .25rem; }
@media (min-width: 992px) { .form-alt-bar { position: static; background: none; } }

/* ---------- Organizasyon şeması ---------- */
.org { overflow-x: auto; padding: 1rem 0 2rem; }
.org ul { display: flex; justify-content: center; padding-top: 24px; position: relative; margin: 0; padding-left: 0; }
.org li { list-style: none; text-align: center; position: relative; padding: 24px 8px 0; }
.org li::before, .org li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 24px; border-top: 2px solid #cbd5e1; }
.org li::after { right: auto; left: 50%; border-left: 2px solid #cbd5e1; }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 2px solid #cbd5e1; border-radius: 0 6px 0 0; }
.org li:first-child::after { border-radius: 6px 0 0 0; }
.org ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #cbd5e1; height: 24px; }
/* Geniş ağaçta sol taraf kesilmesin: içerik kadar genişle, kap kaydırılsın */
.org > ul { padding-top: 0; width: max-content; min-width: 100%; }
.org-kart { display: inline-block; min-width: 170px; max-width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(15,23,42,.1); text-align: left; overflow: hidden; }
.org-kart .ust { padding: .7rem .9rem; border-top: 4px solid var(--renk, #dd0b14); }
.org-kart .ust .ad { font-weight: 700; font-size: .9rem; }
.org-kart .ust .amir { font-size: .78rem; color: #475569; }
.org-kart .liste { border-top: 1px solid #eef2f6; padding: .5rem .9rem; font-size: .78rem; color: #475569; max-height: 160px; overflow-y: auto; }
.org-kart .liste div { padding: 2px 0; }

/* ---------- Giriş ---------- */
.giris-sayfa { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 15% 0%, rgba(255, 220, 1, .32) 0, transparent 50%), radial-gradient(circle at 100% 100%, rgba(221, 11, 20, .16) 0, transparent 45%), var(--page-bg); }
.giris-logo { height: 96px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .15)); }
.giris-kart .card { overflow: hidden; }
.giris-kart .card::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--brand-sari) 50%, var(--brand) 50%); }
.giris-kart { width: 100%; max-width: 400px; }

.bos-durum { text-align: center; padding: 2.5rem 1rem; color: #64748b; }
.bos-durum i { font-size: 2.5rem; opacity: .4; display: block; margin-bottom: .5rem; }
code.json-alan { display: block; white-space: pre; font-size: .8rem; }

/* Duyurular */
.duyuru { padding: 1rem 1.25rem; border-bottom: 1px solid #e2e8f0; border-left: 3px solid transparent; }
.duyuru:last-child { border-bottom: 0; }
.duyuru-onemli { border-left-color: #f59e0b; background: #fffbeb; }
.duyuru-baslik { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.35; }
.duyuru-metin { margin-top: .5rem; color: #334155; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.duyuru-metin a { word-break: break-all; }

/* Avans ödeme planı önizlemesi */
.avans-plan { border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: .9rem 1rem; }
.avans-plan .table { --bs-table-bg: transparent; font-size: .875rem; }
