: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-hover-color: #115e59;
    --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: .925rem;
}

.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: 1.1rem 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    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: .75rem .6rem 1.5rem; overflow-y: auto; flex: 1; }
.tt-nav-title {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    color: #6f8394; padding: 1rem .75rem .35rem;
}
.tt-nav a, .tt-nav span.tt-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem;
    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: 1.05rem; width: 1.2rem; text-align: center; }
.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: 60px;
    background: #fff;
    border-bottom: 1px solid var(--tt-border);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.5rem;
    position: sticky; top: 0; z-index: 1030;
}
.tt-content { padding: 1.5rem; flex: 1; }
.tt-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.tt-page-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.tt-page-head .sub { color: var(--tt-muted); font-size: .85rem; }

.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: .35rem .75rem; font-weight: 600; font-size: .88rem;
}
.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: .85rem 1.1rem; border-radius: 12px 12px 0 0 !important; }
.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .65rem .9rem; vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tt-muted); font-weight: 600; background: #fafbfc; border-bottom-width: 1px; white-space: nowrap; }
.table-hover tbody tr:hover { background: #f8fbfb; }

.tt-stat { padding: 1.1rem 1.2rem; }
.tt-stat .label { color: var(--tt-muted); font-size: .8rem; font-weight: 500; }
.tt-stat .value { font-size: 1.5rem; font-weight: 700; margin-top: .25rem; }
.tt-stat .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; }

.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }
.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: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tt-muted); }

/* ---------- Giriş ---------- */
.tt-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.tt-auth-side {
    background: linear-gradient(160deg, #0f1f2a 0%, #0f3b3f 60%, #0f766e 100%);
    color: #e6eef3;
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
}
.tt-auth-side h2 { font-weight: 700; font-size: 2rem; line-height: 1.2; color: #fff; }
.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: #5eead4; font-size: 1.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: 1rem; }
    .tt-topbar { padding: 0 1rem; }
    .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: .9rem; }
    .tt-stat .value { font-size: 1.1rem; }
    .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; }
