:root {
    --tt-primary: #0f766e;
    --tt-primary-dark: #115e59;
    --tt-primary-soft: #e6f4f2;
    --tt-sidebar: #0f1f2a;
    --tt-sidebar-text: #b6c4cf;
    --tt-sidebar-active: #ffffff;
    --tt-bg: #f4f6f8;
    --tt-border: #e3e8ee;
    --tt-text: #1f2a37;
    --tt-muted: #6b7785;
    --bs-primary: #0f766e;
    --bs-primary-rgb: 15, 118, 110;
    --bs-link-color: #0f766e;
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color: #115e59;
    --bs-link-hover-color-rgb: 17, 94, 89;
    --bs-link-decoration: none;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--tt-bg);
    color: var(--tt-text);
    font-size: .9375rem;
}
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .dropdown-item:hover, .tt-nav a:hover, .list-group-item-action:hover, .tt-brand:hover, .card:hover { text-decoration: none; }
:focus-visible { outline: 2px solid rgba(15,118,110,.55); outline-offset: 2px; }
.fw-bold { font-weight: 600 !important; }
.table, .tt-stat, .card, .tt-num { font-variant-numeric: tabular-nums; }

.btn-primary {
    --bs-btn-bg: var(--tt-primary);
    --bs-btn-border-color: var(--tt-primary);
    --bs-btn-hover-bg: var(--tt-primary-dark);
    --bs-btn-hover-border-color: var(--tt-primary-dark);
    --bs-btn-active-bg: var(--tt-primary-dark);
    --bs-btn-active-border-color: var(--tt-primary-dark);
    --bs-btn-disabled-bg: var(--tt-primary);
    --bs-btn-disabled-border-color: var(--tt-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--tt-primary);
    --bs-btn-border-color: var(--tt-primary);
    --bs-btn-hover-bg: var(--tt-primary);
    --bs-btn-hover-border-color: var(--tt-primary);
    --bs-btn-active-bg: var(--tt-primary-dark);
}
.form-check-input:checked { background-color: var(--tt-primary); border-color: var(--tt-primary); }
.form-control:focus, .form-select:focus { border-color: #5fb3aa; box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.text-primary { color: var(--tt-primary) !important; }
.bg-primary-soft { background: var(--tt-primary-soft) !important; }

/* ---------- Yerleşim ---------- */
.tt-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    background: var(--tt-sidebar);
    color: var(--tt-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .2s ease;
}
.tt-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 16px 20px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.tt-brand-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--tt-primary);
    display: grid; place-items: center;
    font-size: 1rem;
}
.tt-brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--tt-sidebar-text); }
.tt-nav { padding: 8px 12px 24px; overflow-y: auto; flex: 1; }
.tt-nav-title {
    font-size: .75rem; color: #7d909f; padding: 20px 12px 8px;
}
.tt-nav a, .tt-nav span.tt-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    color: var(--tt-sidebar-text);
    border-radius: 8px;
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: 2px;
}
.tt-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.tt-nav a.active { background: var(--tt-primary); color: var(--tt-sidebar-active); }
.tt-nav span.tt-link { opacity: .45; cursor: default; }
.tt-nav .bi { font-size: 1rem; width: 20px; text-align: center; }
.tt-nav .badge { background: rgba(255,255,255,.12) !important; color: #e6eef3 !important; font-weight: 500; font-size: .72rem; padding: 2px 6px; border-radius: 4px; }
.tt-nav a.active .badge { background: rgba(255,255,255,.22) !important; color: #fff !important; }
.tt-nav .badge-soon { margin-left: auto; font-size: .62rem; background: rgba(255,255,255,.1); color: #c9d4dd; padding: .15rem .4rem; border-radius: 4px; }

.tt-main { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.tt-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--tt-border);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 1030;
}
.tt-content { padding: 24px; flex: 1; }
.tt-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tt-page-head h1 { font-size: 1.375rem; font-weight: 600; margin: 0; line-height: 1.2; }
.tt-page-head .sub { color: var(--tt-muted); font-size: .8125rem; margin-top: 4px; }

.tt-sube-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--tt-primary-soft); color: var(--tt-primary-dark);
    border: 1px solid #c8e6e2; border-radius: 8px;
    padding: 6px 12px; font-weight: 500; font-size: .875rem;
}
.tt-sube-btn:hover { background: #d6eeea; color: var(--tt-primary-dark); }

.tt-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--tt-primary); color: #fff;
    display: grid; place-items: center; font-weight: 600; font-size: .85rem;
}

/* ---------- Kartlar / tablolar ---------- */
.card { border: 1px solid var(--tt-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--tt-border); font-weight: 600; padding: 12px 16px; border-radius: 12px 12px 0 0 !important; }
.card-body { padding: 16px; }
.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 8px 12px; vertical-align: middle; }
.table > :not(caption) > * > *:first-child { padding-left: 16px; }
.table > :not(caption) > * > *:last-child { padding-right: 16px; }
.table thead th { font-size: .8125rem; color: var(--tt-muted); font-weight: 500; background: #fafbfc; border-bottom-width: 1px; white-space: nowrap; }
.table td a:not(.btn):not(.badge) { color: var(--tt-primary-dark); }
.table td a:not(.btn):not(.badge):hover { color: var(--tt-primary); }
.table-hover tbody tr:hover { background: #f8fbfb; }

.tt-stat { padding: 20px; }
.tt-stat .label { color: var(--tt-muted); font-size: .8125rem; font-weight: 400; }
.tt-stat .value { font-size: 1.625rem; font-weight: 500; margin-top: 4px; line-height: 1.25; letter-spacing: -.01em; }
.tt-stat .icon { display: none !important; }

.form-label { font-weight: 500; font-size: .8125rem; margin-bottom: 4px; }
.form-text { font-size: .78rem; }
.required::after { content: " *"; color: #dc3545; }

.badge-soft-success { background: #e7f6ec; color: #18794e; }
.badge-soft-danger { background: #fdecec; color: #b42318; }
.badge-soft-secondary { background: #eef1f4; color: #4b5563; }
.badge-soft-primary { background: var(--tt-primary-soft); color: var(--tt-primary-dark); }
.badge-soft-warning { background: #fff4e0; color: #9a6700; }

.yetki-tablo th, .yetki-tablo td { text-align: center; }
.yetki-tablo th:first-child, .yetki-tablo td:first-child { text-align: left; }
.yetki-grup td { background: #fafbfc; font-weight: 600; font-size: .8125rem; color: var(--tt-muted); }

/* ---------- Giriş ---------- */
.tt-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.tt-auth-side {
    background: var(--tt-sidebar);
    color: #e6eef3;
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
}
.tt-auth-side h2 { font-weight: 500; font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; color: #fff; max-width: 28rem; }
.tt-auth-side ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.tt-auth-side li { display: flex; gap: .75rem; margin-bottom: 1rem; color: #c8d6df; }
.tt-auth-side li .bi { color: #7d909f; font-size: 1rem; }
.tt-auth-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
.tt-auth-form .inner { width: 100%; max-width: 380px; }

@media (max-width: 991.98px) {
    .tt-sidebar { transform: translateX(-100%); }
    body.sidebar-acik .tt-sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
    body.sidebar-acik .tt-backdrop { display: block; }
    .tt-main { margin-left: 0; }
    .tt-content { padding: 16px; }
    .tt-topbar { padding: 0 16px; }
    .tt-auth { grid-template-columns: 1fr; }
    .tt-auth-side { display: none; }
}
.tt-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }

.form-check-input { border-color: #aeb8c3; }
@media (max-width: 575.98px) {
    .tt-stat { padding: 16px; }
    .tt-stat .value { font-size: 1.25rem; }
    .tt-stat .icon { display: none !important; }
}

.nav-pills .nav-link { color: var(--tt-primary-dark); }
.nav-pills .nav-link.active { background: var(--tt-primary); color: #fff; }

/* Sol menü kaydırma çubuğu (küçük ekranlarda alt öğeler görünsün) */
.tt-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.tt-nav::-webkit-scrollbar { width: 6px; }
.tt-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
/* Ayarlar sekmeleri */
.tt-ayar-sekme { gap: .35rem; border-bottom: 1px solid var(--tt-border); padding-bottom: .75rem; }
.tt-ayar-sekme .nav-link { color: var(--tt-text, #334); background: #fff; border: 1px solid var(--tt-border); }
.tt-ayar-sekme .nav-link.active { color: #fff; border-color: var(--tt-primary); }

/* Notlar */
.min-w-0 { min-width: 0; }
.tt-not-tamam { background: #f7faf9; }
.tt-not-gecmis li { padding: .1rem 0; border-left: 2px solid var(--tt-border); padding-left: .5rem; margin-left: .2rem; }

/* v2 işareti */
.tt-v2 { font-size: .7em; font-weight: 400; color: #7d909f; vertical-align: super; margin-left: 2px; }

/* ---------- 2.8.0 ---------- */
/* Sayfalama ve uyarılar: tek vurgu rengi, sakin zemin */
.pagination { --bs-pagination-active-bg: var(--tt-primary); --bs-pagination-active-border-color: var(--tt-primary); --bs-pagination-color: var(--tt-text); --bs-pagination-hover-color: var(--tt-primary-dark); --bs-pagination-focus-color: var(--tt-primary-dark); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.alert { border-radius: 12px; }
.alert-danger, .alert-warning, .alert-info, .alert-success { background: #fff; color: var(--tt-text); border: 1px solid var(--tt-border); border-left-width: 3px; }
.alert-danger { border-left-color: #dc2626; }
.alert-warning { border-left-color: #d97706; }
.alert-info { border-left-color: #64748b; }
.alert-success { border-left-color: var(--tt-primary); }
.alert-danger > .bi:first-child { color: #dc2626; }
.alert-warning > .bi:first-child { color: #d97706; }
.alert .alert-link { color: var(--tt-primary-dark); font-weight: 500; }

/* Ana sayfa: dikkat listesi */
.tt-dikkat .list-group-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; }
.tt-dikkat .nokta { width: 8px; height: 8px; border-radius: 50%; background: #d97706; flex: none; }
.tt-dikkat .nokta.kirmizi { background: #dc2626; }
.tt-gecikme { color: var(--tt-muted); font-size: .8125rem; }

/* Notlar: sade etiketler */
.tt-not .tt-etiket { font-size: .8125rem; color: var(--tt-muted); }
.tt-not .tt-etiket.gecmis { color: #b42318; }
.tt-not .btn-sil { color: var(--tt-muted); }
.tt-not .btn-sil:hover { color: #dc2626; }

/* İmza: ödendi damgası */
.tt-damga {
    display: inline-block; font-size: .6875rem; font-weight: 600; line-height: 1;
    color: #18794e; border: 1.5px solid currentColor; border-radius: 4px;
    padding: 3px 6px; transform: rotate(-4deg); letter-spacing: .02em; white-space: nowrap; opacity: .9;
}

/* Raporlar listesi */
.tt-rapor-grup { font-size: .875rem; font-weight: 600; color: var(--tt-muted); margin: 24px 0 8px; }
.tt-rapor-grup:first-of-type { margin-top: 8px; }
.tt-rapor { display: flex; gap: 12px; padding: 12px 16px; color: var(--tt-text); border-top: 1px solid var(--tt-border); }
.tt-rapor:hover { background: #f8fbfb; color: var(--tt-text); }
.tt-rapor .bi { color: var(--tt-muted); font-size: 1rem; width: 20px; text-align: center; padding-top: 1px; }
.tt-rapor:hover .bi, .tt-rapor:hover .ad { color: var(--tt-primary); }
.tt-rapor .ad { font-weight: 500; }
.tt-dikkat .list-group-item > .flex-grow-1 { flex: 1 1 240px; min-width: 0; }
.tt-dikkat .nokta { align-self: flex-start; margin-top: 8px; }
