/* Credentials — tema.md (Karansu.UI) renk/ölçü standardı, mobil öncelikli */
:root {
    --k-primary: #1f4e79;
    --k-primary-hover: #173b5c;
    --k-primary-rgb: 31, 78, 121;
    --k-secondary: #6c757d;
    --k-success: #198754;
    --k-danger: #c0392b;
    --k-warning: #e0a800;
    --k-info: #0d6efd;
    --k-bg: #f4f6f9;
    --k-surface: #ffffff;
    --k-border: #dee2e6;
    --k-text: #212529;
    --k-muted: #6c757d;
    --k-sidebar: #10233a;

    --bs-primary: var(--k-primary);
    --bs-primary-rgb: var(--k-primary-rgb);
    --bs-body-bg: var(--k-bg);
    --bs-body-color: var(--k-text);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-size: .748rem;
    --bs-link-color: var(--k-primary);
    --bs-link-color-rgb: var(--k-primary-rgb);
}

html, body { height: 100%; }
body { background: var(--k-bg); -webkit-font-smoothing: antialiased; }
h4 { font-size: 1.08rem; font-weight: 600; margin: 0; }
h5 { font-size: .9rem; }
h6 { font-size: .8rem; }
.small, small { font-size: .68rem; }
.k-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; }
.k-sub { color: var(--k-muted); font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ butonlar (§5) */
.btn { font-size: .71rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: 8px; }
.btn-sm { font-size: .66rem; }
.btn-primary { --bs-btn-bg: var(--k-primary); --bs-btn-border-color: var(--k-primary); --bs-btn-hover-bg: var(--k-primary-hover); --bs-btn-hover-border-color: var(--k-primary-hover); --bs-btn-active-bg: var(--k-primary-hover); --bs-btn-disabled-bg: var(--k-primary); --bs-btn-disabled-border-color: var(--k-primary); }
.btn-outline-primary { --bs-btn-color: var(--k-primary); --bs-btn-border-color: #c9d6e3; --bs-btn-hover-bg: rgba(var(--k-primary-rgb), .08); --bs-btn-hover-color: var(--k-primary); --bs-btn-hover-border-color: var(--k-primary); --bs-btn-active-bg: var(--k-primary); --bs-btn-active-border-color: var(--k-primary); }
.btn-light { --bs-btn-bg: #f3f5f8; --bs-btn-border-color: #e3e7ec; --bs-btn-hover-bg: #e9edf2; --bs-btn-hover-border-color: #d9dfe6; }
.k-btn-40 { min-height: 40px; min-width: 40px; border-radius: 8px; }
.modal-footer .btn { min-width: 96px; border-radius: 9px; }
.btn-lg { font-size: .82rem; }

.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: 6px; flex: 0 0 auto; }
.btn-icon i { font-size: .76rem; }
.btn-soft-primary { background: rgba(31, 78, 121, .1); color: var(--k-primary); border: 0; }
.btn-soft-info { background: rgba(13, 110, 253, .1); color: #0d6efd; border: 0; }
.btn-soft-success { background: rgba(25, 135, 84, .1); color: #198754; border: 0; }
.btn-soft-danger { background: rgba(192, 57, 43, .1); color: var(--k-danger); border: 0; }
.btn-soft-secondary { background: rgba(108, 117, 125, .12); color: #495057; border: 0; }
.btn-soft-primary:hover { background: var(--k-primary); color: #fff; }
.btn-soft-info:hover { background: #0d6efd; color: #fff; }
.btn-soft-success:hover { background: #198754; color: #fff; }
.btn-soft-danger:hover { background: var(--k-danger); color: #fff; }
.btn-soft-secondary:hover { background: #6c757d; color: #fff; }
.k-row-actions { display: flex; gap: .25rem; justify-content: flex-end; flex: 0 0 auto; }

/* ------------------------------------------------------------------ rozetler */
.badge { font-size: .665rem; font-weight: 500; padding: .5em .75em; border-radius: .375rem; }
.badge-soft-primary { background: rgba(31, 78, 121, .1); color: var(--k-primary); }
.badge-soft-danger { background: rgba(192, 57, 43, .1); color: var(--k-danger); }
.badge-outline { background: #fff; color: #495057; border: 1px solid #dfe2e6; }

/* ------------------------------------------------------------------ form (§6) */
.form-control, .form-select, .input-group-text {
    min-height: 40px; border-radius: 8px; border-color: #dfe2e6; font-size: .74rem; background-color: #fff;
}
.form-control:focus { border-color: rgba(var(--k-primary-rgb), .5); box-shadow: 0 0 0 3px rgba(var(--k-primary-rgb), .09); }
.form-control[readonly], .input-group-text { background: #f8f9fb; }
.form-label { font-size: .78rem; font-weight: 600; color: #495057; margin-bottom: .3rem; }
.form-label.required::after { content: " *"; color: var(--k-danger); }
.form-text { font-size: .68rem; }
.form-check-input:checked { background-color: var(--k-primary); border-color: var(--k-primary); }
.input-group > .form-control { min-width: 0; }
.input-group .k-ig-btn { min-height: 40px; width: 40px; padding: 0; border-color: #dfe2e6; }
.input-group > :last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
textarea.k-not { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; line-height: 1.45; }
.alert { font-size: .72rem; border-radius: 8px; }

.k-form-hero { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.k-form-hero-ikon { width: 40px; height: 40px; border-radius: 10px; background: rgba(var(--k-primary-rgb), .1); color: var(--k-primary); display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; }
.k-form-section { background: rgba(var(--k-primary-rgb), .03); border: 1px solid #e3e9f0; border-radius: 12px; padding: .9rem; margin-bottom: .9rem; }
.k-form-section:last-child { margin-bottom: 0; }
.k-form-section-baslik { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--k-primary); margin-bottom: .75rem; }
.k-form-section-baslik i { margin-right: .3rem; }
.k-form-actions { border-top: 1px solid #edf0f3; }

.k-durum-grup { display: flex; flex-wrap: wrap; gap: .35rem; }
.k-durum-grup .btn { min-height: 34px; border-radius: 8px; }
.k-ozel-satir { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px dashed #dfe5ec; }
.k-ozel-satir:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* ------------------------------------------------------------------ oturum ekranı */
.k-auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.k-auth-brand {
    background: radial-gradient(circle at 20% 20%, #2b6aa3 0, transparent 45%), linear-gradient(150deg, #10233a 0%, #1f4e79 100%);
    color: #e9f1f9; padding: 3.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem;
}
.k-auth-brand h1 { font-size: 1.9rem; font-weight: 700; line-height: 1.2; max-width: 30rem; }
.k-auth-brand em { font-style: normal; color: #7fd3e6; }
.k-auth-brand p { font-size: .82rem; color: #c3d4e6; max-width: 30rem; }
.k-auth-rozet { align-self: flex-start; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: .3rem .8rem; font-size: .7rem; }
.k-auth-features { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.k-auth-feature { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: .7rem .9rem; display: flex; gap: .55rem; align-items: center; font-size: .72rem; backdrop-filter: blur(6px); }
.k-auth-main { background: #fff; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.k-auth-panel { width: 100%; max-width: 380px; }
.k-auth-logo { font-size: 1.15rem; font-weight: 700; color: var(--k-primary); display: flex; align-items: center; gap: .5rem; margin-bottom: 1.75rem; justify-content: center; }
.k-auth-logo i { font-size: 1.5rem; }
.k-auth-head { text-align: center; margin-bottom: 1.25rem; }
.k-auth-head p { color: var(--k-muted); margin: .25rem 0 0; }
.k-auth-control { position: relative; }
.k-auth-control > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8a96a3; pointer-events: none; }
.k-auth-control .form-control { min-height: 46px; padding-left: 2.4rem; padding-right: 2.6rem; font-size: .8rem; }
.k-auth-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a96a3; width: 34px; height: 34px; }
.k-auth-submit { min-height: 46px; margin-top: .5rem; }
.k-auth-alt { text-align: center; color: var(--k-muted); font-size: .66rem; margin-top: 2rem; }
.k-uyari { display: flex; gap: .5rem; align-items: flex-start; }

@media (max-width: 991.98px) {
    .k-auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .k-auth-brand { padding: 1.5rem 1.25rem; gap: .5rem; }
    .k-auth-brand h1 { font-size: 1.2rem; }
    .k-auth-brand p, .k-auth-features { display: none; }
    .k-auth-main { align-items: flex-start; padding-top: 1.75rem; }
    .k-auth-logo { margin-bottom: 1rem; }
}

/* ------------------------------------------------------------------ kasa yerleşimi */
.k-topbar {
    position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid #e7ebf0;
    display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top));
}
.k-topbar-logo { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--k-primary); font-size: .92rem; flex: 0 0 auto; }
.k-topbar-logo i { font-size: 1.2rem; }
.k-arama { position: relative; flex: 1 1 auto; max-width: 520px; }
.k-arama i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #8a96a3; }
.k-arama .form-control { padding-left: 2.2rem; }
.k-topbar-eylem { display: flex; gap: .4rem; margin-left: auto; flex: 0 0 auto; }

.k-govde { display: grid; grid-template-columns: 230px 1fr; gap: 1rem; padding: 1rem; max-width: 1400px; margin: 0 auto; }
.k-yan { background: var(--k-sidebar); border-radius: 14px; padding: .75rem .6rem; align-self: start; position: sticky; top: 76px; }
.k-yan-baslik { color: #8fb3d9; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .5rem .55rem .35rem; }
.k-filtre { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .5rem; }
.k-filtre-oge {
    display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: none; color: #dbe7f3;
    padding: .5rem .6rem; border-radius: 8px; font-size: .72rem; text-align: left; border-left: 3px solid transparent;
}
.k-filtre-oge i { color: #8cc4ff; }
.k-filtre-oge span { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-filtre-oge b { font-weight: 600; font-size: .64rem; color: #a9c2dc; }
.k-filtre-oge:hover { background: rgba(255, 255, 255, .07); }
.k-filtre-oge.aktif { background: #2563a6; color: #fff; border-left-color: #2dd4bf; }
.k-filtre-oge.aktif i, .k-filtre-oge.aktif b { color: #fff; }
.k-yan .text-muted { color: #8fa6bf !important; }

.k-icerik { min-width: 0; }
.k-sayfa-baslik { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: .75rem; }
.k-kart { border-radius: 14px; overflow: hidden; }

.k-liste { background: #fff; }
.k-satir { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-bottom: 1px solid #eef1f4; }
.k-satir:nth-child(even) { background: #f8fafc; }
.k-satir:hover { background: #f0f4f9; }
.k-satir:last-child { border-bottom: 0; }
.k-satir-ikon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; font-size: 1rem; }
.k-satir-metin { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.k-satir-baslik { font-weight: 600; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-satir-rozet { gap: .35rem; flex: 0 0 auto; align-items: center; }
.k-tur-sunucu { background: rgba(31, 78, 121, .1); color: var(--k-primary); }
.k-tur-veritabani { background: rgba(13, 110, 253, .1); color: #0d6efd; }
.k-tur-ftp { background: rgba(224, 168, 0, .14); color: #a67c00; }
.k-tur-hesap { background: rgba(25, 135, 84, .1); color: #198754; }
.k-tur-api { background: rgba(111, 66, 193, .1); color: #6f42c1; }
.k-tur-kart { background: rgba(192, 57, 43, .1); color: var(--k-danger); }
.k-tur-not { background: rgba(108, 117, 125, .12); color: #495057; }

.k-bos { text-align: center; padding: 3rem 1rem; color: var(--k-muted); }
.k-bos > i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.k-bos h5 { font-weight: 600; color: #495057; }

/* ------------------------------------------------------------------ detay */
.k-degerler { border: 1px solid #e7ebf0; border-radius: 12px; overflow: hidden; }
.k-deger { display: grid; grid-template-columns: 150px 1fr auto; gap: .75rem; align-items: center; padding: .6rem .85rem; border-bottom: 1px solid #eef1f4; }
.k-deger:last-child { border-bottom: 0; }
.k-deger:nth-child(even) { background: #f8fafc; }
.k-deger-ad { color: var(--k-muted); font-size: .7rem; font-weight: 600; }
.k-deger-icerik { min-width: 0; word-break: break-all; }
.k-deger-eylem { display: flex; gap: .25rem; }
.k-gizli { letter-spacing: .08em; }
.k-not-goster { white-space: pre-wrap; word-break: break-word; font-size: .72rem; margin: 0; background: #fff; border: 1px solid #e7ebf0; border-radius: 8px; padding: .75rem; max-height: 50vh; overflow: auto; }
.k-gecmis { display: flex; flex-wrap: wrap; gap: .35rem; }
.k-gecmis-oge { border: 1px solid #dfe5ec; background: #fff; border-radius: 8px; padding: .35rem .6rem; font-size: .68rem; color: #495057; }
.k-gecmis-oge:hover { border-color: var(--k-primary); color: var(--k-primary); }
.k-adimlar { padding-left: 1.1rem; }
.k-adimlar li { margin-bottom: .75rem; }
.k-totp-sir { background: #f3f6f9; border: 1px dashed #c9d6e3; border-radius: 8px; padding: .6rem .8rem; font-size: .9rem; letter-spacing: .06em; word-break: break-all; }
.k-ice-liste { max-height: 260px; overflow: auto; border: 1px solid #e7ebf0; border-radius: 8px; padding: .5rem .75rem; font-size: .72rem; }
.k-ice-liste > div { padding: .2rem 0; }

.tooltip { --bs-tooltip-font-size: .68rem; --bs-tooltip-padding-y: .2rem; --bs-tooltip-padding-x: .45rem; }
.toast { font-size: .74rem; }
.swal2-popup { font-size: .8rem; }

/* ------------------------------------------------------------------ mobil */
@media (max-width: 991.98px) {
    .k-govde { grid-template-columns: 1fr; padding: .75rem; gap: .75rem; }
    .k-yan { position: static; background: transparent; padding: 0; border-radius: 0; }
    .k-yan-baslik { display: none; }
    .k-filtre { flex-direction: row; overflow-x: auto; gap: .35rem; margin-bottom: .4rem; padding-bottom: .15rem; scrollbar-width: none; }
    .k-filtre::-webkit-scrollbar { display: none; }
    .k-filtre-oge { width: auto; flex: 0 0 auto; background: #fff; color: #344555; border: 1px solid #dfe5ec; border-radius: 999px; padding: .4rem .75rem; }
    .k-filtre-oge i { color: var(--k-primary); }
    .k-filtre-oge b { color: var(--k-muted); }
    .k-filtre-oge.aktif { background: var(--k-primary); border-color: var(--k-primary); }
    .k-yan .text-muted { display: none; }
}

@media (max-width: 575.98px) {
    .k-topbar { padding-left: .75rem; padding-right: .75rem; gap: .5rem; flex-wrap: wrap; }
    .k-topbar-logo span { display: none; }
    .k-arama { order: 3; flex-basis: 100%; max-width: none; }
    .k-govde { padding: .6rem; }
    .k-satir { padding: .65rem .75rem; gap: .6rem; }
    .k-deger { grid-template-columns: 1fr auto; row-gap: .15rem; }
    .k-deger-ad { grid-column: 1 / -1; }
    .btn-icon { width: 36px; height: 36px; }
    .modal-footer { flex-wrap: nowrap; }
    .modal-footer .btn { min-width: 0; flex: 1 1 auto; }
    .modal-footer .me-auto { flex: 0 0 auto; }
    .toast-container { left: 0; right: 0; }
    .toast { width: auto; }
}
