/* ==========================================================================
   Trackin — Tema v2
   AdminKit (app.css) üzerine yüklenir; onu değiştirmez, sadece üzerine yazar.
   Tüm renkler ve ölçüler aşağıdaki değişkenlerden gelir. Grafik renkleri de
   (js/invend-ui.js) aynı paletten beslenir; bir rengi değiştirmek için sadece
   burayı ve invend-ui.js'teki PALETTE'i güncellemek yeterli.
   ========================================================================== */

:root {
    /* Marka */
    --iv-sidebar:      #3048F2;   /* yan menü */
    --iv-sidebar-2:    #2A3FE0;   /* yan menü alt ton */
    --iv-primary:      #1E88F5;   /* buton, link, vurgular */
    --iv-primary-rgb:  30, 136, 245;
    --iv-purple:       #8A5CF6;   /* grafik 1 */
    --iv-green:        #34C38F;   /* grafik 2, olumlu */
    --iv-cyan:         #4DD4E6;   /* grafik 3 */
    --iv-orange:       #F7A440;   /* uyarı */
    --iv-red:          #F0506E;   /* hata, olumsuz */

    /* Nötrler */
    --iv-bg:           #F3F4F9;
    --iv-surface:      #FFFFFF;
    --iv-border:       #E7E9F1;
    --iv-border-soft:  #F0F1F6;
    --iv-text:         #1F2433;
    --iv-text-2:       #4B5263;
    --iv-muted:        #8A91A5;
    --iv-soft-btn:     #E9ECF4;

    --iv-radius:       6px;
    --iv-radius-sm:    4px;
    --iv-shadow:       0 1px 2px rgba(31, 36, 51, .04), 0 2px 10px rgba(31, 36, 51, .04);
    --iv-font:         "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Bootstrap değişkenleri (buton, link, form-check vb. bunları kullanır) */
    --bs-primary: var(--iv-primary);
    --bs-primary-rgb: var(--iv-primary-rgb);
    --bs-link-color: var(--iv-primary);
    --bs-link-color-rgb: var(--iv-primary-rgb);
    --bs-link-hover-color: #0F6BD0;
    --bs-body-font-family: var(--iv-font);
    --bs-body-color: var(--iv-text);
    --bs-border-color: var(--iv-border);

    /* Eski sayfaların kullandığı değişkenler (geriye uyumluluk) */
    --invend-dark: var(--iv-text);
    --invend-blue: var(--iv-primary);
    --invend-warm: var(--iv-orange);
}

html, body { font-family: var(--iv-font); }
body {
    background-color: var(--iv-bg);
    color: var(--iv-text);
    font-size: .9rem;
    -webkit-font-smoothing: antialiased;
}
.main, .content { background: var(--iv-bg); }
.content { padding: 1.75rem 2rem 2rem; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--iv-text); font-family: var(--iv-font); }
a { text-decoration: none; }
.text-muted { color: var(--iv-muted) !important; }
.text-primary { color: var(--iv-primary) !important; }
.text-success { color: var(--iv-green) !important; }
.text-danger  { color: var(--iv-red) !important; }
.text-warning { color: #D98A1C !important; }
.text-purple  { color: var(--iv-purple) !important; }
.fw-medium { font-weight: 500 !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Yan menü
   ========================================================================== */
.sidebar,
.sidebar-content {
    background: linear-gradient(180deg, var(--iv-sidebar) 0%, var(--iv-sidebar-2) 100%) !important;
}
.sidebar { min-width: 260px; max-width: 260px; }
.wrapper { background: var(--iv-bg) !important; }
@media (min-width: 992px) { .wrapper { background: var(--iv-sidebar-2) !important; } }
.main { min-height: 100vh; }
/* Menü sayfa kaydırılırken yerinde kalsın */
@media (min-width: 992px) {
    .sidebar-content { position: sticky; top: 0; }
}

.sidebar-brand {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 1.35rem 1.6rem 1.1rem !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    letter-spacing: .4px;
    white-space: nowrap;
}
.sidebar-brand:hover { color: #fff !important; }
.brand-mark {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0;
}

/* Kullanıcı kartı */
.sidebar-user {
    margin: .4rem 1.25rem 1.1rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--iv-radius-sm);
    display: flex; align-items: center; gap: .75rem;
    color: #fff !important;
}
.sidebar-user:hover { background: rgba(255, 255, 255, .06); }
.avatar {
    position: relative;
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--iv-sidebar);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
    margin: 0 !important;
    max-height: none !important;
}
.avatar.avatar-sm { width: 34px; height: 34px; flex-basis: 34px; font-size: .8rem; background: var(--iv-sidebar); color: #fff; }
.avatar .online {
    position: absolute; right: -1px; bottom: -1px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--iv-green);
    border: 2px solid var(--iv-sidebar);
}
.sidebar-user-name { font-weight: 500; font-size: .95rem; line-height: 1.2; }
.sidebar-user-role { font-size: .8rem; opacity: .75; }

.sidebar-nav { padding-bottom: 2rem; }
.sidebar-header {
    color: rgba(255, 255, 255, .62) !important;
    font-size: .78rem !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: .3px !important;
    padding: 1.1rem 1.6rem .55rem !important;
    margin: 0 1.25rem 0 0 !important;
}
.sidebar-header::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: .6rem;
    background: rgba(255, 255, 255, .16);
}
.sidebar-link, a.sidebar-link {
    display: flex !important;
    align-items: center;
    gap: .15rem;
    color: rgba(255, 255, 255, .88) !important;
    background: transparent !important;
    border-left: 3px solid transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: .62rem 1.5rem .62rem 1.45rem !important;
    font-weight: 500;
    font-size: .92rem;
    transition: background .15s ease, color .15s ease;
}
.sidebar-link i, .sidebar-link svg {
    color: rgba(255, 255, 255, .78) !important;
    stroke: currentColor;
    width: 18px; height: 18px;
    margin-right: .7rem;
}
.sidebar-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08) !important;
}
.sidebar-link:hover svg { color: #fff !important; }
.sidebar-item.active > .sidebar-link,
.sidebar-item.active > .sidebar-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .15) !important;
    border-left-color: #fff !important;
}
.sidebar-item.active > .sidebar-link svg { color: #fff !important; }
.sidebar-link .badge { margin-left: auto; }

/* Açılır menü grubu (Entegrasyonlar) */
.sidebar-toggle-group .sidebar-caret {
    margin: 0 0 0 auto !important;
    width: 16px !important; height: 16px !important;
    transition: transform .2s ease;
}
.sidebar-toggle-group:not(.collapsed) .sidebar-caret { transform: rotate(180deg); }
.sidebar-item.active > .sidebar-toggle-group { background: transparent !important; border-left-color: transparent !important; }
.sidebar-dropdown { margin: 0; padding: .15rem 0 .35rem; background: rgba(0, 0, 0, .08); }
.sidebar-dropdown .sidebar-link {
    padding: .5rem 1.5rem .5rem 3.6rem !important;
    font-size: .88rem;
    color: rgba(255, 255, 255, .78) !important;
}
.sidebar-dropdown .sidebar-link::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; opacity: .6; margin-right: .7rem; flex: 0 0 5px;
}
.sidebar-dropdown .sidebar-item.active > .sidebar-link { color: #fff !important; background: rgba(255, 255, 255, .12) !important; }
.sidebar-link > span:first-child { display: inline-flex; align-items: center; }

/* ==========================================================================
   Üst bar
   ========================================================================== */
.navbar-bg {
    background: var(--iv-surface) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--iv-border);
    min-height: 70px;
    padding: .5rem 1.5rem !important;
}
.hamburger, .hamburger::before, .hamburger::after { background: var(--iv-text) !important; }
.topbar-info {
    display: flex; align-items: center; gap: 1.5rem;
    margin-left: 1.25rem;
    font-weight: 500;
    color: var(--iv-text);
}
.topbar-info .ti-label { color: var(--iv-muted); font-weight: 400; margin-right: .35rem; }
.topbar-info .ti-live, .topbar-info .ti-live:hover {
    text-decoration: none !important;
    display: inline-flex; align-items: center; gap: .45rem;
}
.topbar-info .dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--iv-green);
    box-shadow: 0 0 0 3px rgba(52, 195, 143, .18);
}
.topbar-info .dot.stale { background: var(--iv-orange); box-shadow: 0 0 0 3px rgba(247, 164, 64, .18); }
.navbar .nav-icon {
    position: relative;
    color: var(--iv-text) !important;
    padding: .35rem .6rem !important;
}
.navbar .nav-icon svg { width: 21px; height: 21px; stroke-width: 1.8; }
.nav-count {
    position: absolute; top: -2px; right: 0;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px;
    font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
    color: #fff; border: 2px solid #fff;
}
.nav-count.red { background: var(--iv-red); }
.nav-count.green { background: var(--iv-green); }
.navbar .nav-user { display: flex; align-items: center; gap: .6rem; color: var(--iv-text) !important; }
.dropdown-menu {
    border: 1px solid var(--iv-border);
    border-radius: var(--iv-radius);
    box-shadow: 0 10px 30px rgba(31, 36, 51, .10);
    padding: .35rem;
}
.dropdown-item { border-radius: var(--iv-radius-sm); padding: .5rem .8rem; }
.dropdown-item:active { background: var(--iv-primary); }

/* ==========================================================================
   Sayfa başlığı  (her sayfanın en üstündeki başlık + buton satırı)
   ========================================================================== */
.content > .container-fluid > .d-flex.justify-content-between:first-child,
.page-head {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem !important;
    border-bottom: 1px solid #D9DCE6;
}
.content > .container-fluid > .d-flex.justify-content-between:first-child h1,
.page-head h1 {
    font-size: 1.6rem !important;
    font-weight: 400 !important;
    margin: 0;
}
.content > .container-fluid > .d-flex.justify-content-between:first-child h1 strong { font-weight: 400; }
.content > .container-fluid > .d-flex.justify-content-between:first-child h1 .small { font-size: 1rem; }
.page-links { display: inline-flex; flex-wrap: wrap; align-items: center; margin-left: .9rem; }
.page-links a {
    color: var(--iv-text); font-size: .95rem;
    padding: 0 .75rem; line-height: 1.1;
    border-left: 1px solid #C9CDD8;
}
.page-links a:first-child { border-left: 0; padding-left: 0; }
.page-links a:hover, .page-links a.active { color: var(--iv-primary); }

/* Araç çubuğu (tarih, filtre, butonlar) */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.toolbar .spacer { flex: 1 1 auto; }
.date-pill {
    display: inline-flex; align-items: center; gap: 1.25rem;
    background: #E3E7F2; color: var(--iv-text);
    border-radius: var(--iv-radius-sm);
    padding: .55rem 1rem;
    font-weight: 500;
}
.date-pill a { color: var(--iv-primary); display: inline-flex; }
.date-pill svg { width: 18px; height: 18px; }
.link-strong { color: var(--iv-primary); font-size: 1.05rem; font-weight: 400; }

/* ==========================================================================
   Kartlar
   ========================================================================== */
.card {
    background: var(--iv-surface);
    border: 1px solid var(--iv-border) !important;
    border-radius: var(--iv-radius) !important;
    box-shadow: var(--iv-shadow) !important;
    margin-bottom: 1.5rem;
}
.row > [class*="col"] > .card.h-100 { margin-bottom: 0; }
.row.g-3 > [class*="col"] > .card,
.row.g-4 > [class*="col"] > .card { margin-bottom: 0; }
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--iv-border-soft) !important;
    padding: 1.15rem 1.5rem !important;
    font-weight: 500 !important;
    font-size: 1rem;
    color: var(--iv-text);
}
.card-header .card-subtitle, .card-sub {
    display: block;
    margin-top: .2rem;
    font-weight: 400; font-size: .88rem;
    color: var(--iv-text-2);
}
.card-body { padding: 1.4rem 1.5rem; }
.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--iv-border-soft) !important;
    padding: .85rem 1.5rem !important;
}
.card-title { font-weight: 500; font-size: 1rem; color: var(--iv-text); }
.display-6 { font-weight: 500 !important; color: var(--iv-text); font-size: 2rem; }

/* Eski KPI kartları: üst renk şeridi kaldırıldı, sade görünüm */
.kpi-card::before { display: none !important; }
.kpi-card .card-body > .text-muted.small:first-child,
.kpi-card .card-body > .text-muted:first-child {
    color: var(--iv-primary) !important;
    font-weight: 500;
    font-size: .88rem !important;
}
.kpi-card .h3, .kpi-card .h4 { font-weight: 700; margin: .25rem 0 .2rem; }

/* ==========================================================================
   İstatistik şeridi  (referanstaki üstteki 4'lü kutu)
   ========================================================================== */
.stat-strip .card-body { padding: 1.9rem 1.5rem; }
.stat-strip .row > [class*="col"] { position: relative; }
.kstat {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    min-height: 92px;
}
.kstat > div:first-child { min-width: 0; flex: 1 1 auto; }
.stat-value {
    font-size: 1.7rem; font-weight: 700; line-height: 1.1;
    color: var(--iv-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.stat-value .unit { font-size: 1.1rem; font-weight: 500; margin-left: .15rem; }
.stat-label { color: var(--iv-primary); font-size: 1.1rem; font-weight: 500; margin-top: .2rem; }
.stat-label.purple { color: var(--iv-purple); }
.stat-label.green { color: var(--iv-green); }
.stat-label.orange { color: #E08F2A; }
.stat-delta { color: var(--iv-text-2); font-size: .85rem; margin-top: .25rem; line-height: 1.35; }
.stat-delta .up { color: var(--iv-green); }
.stat-delta .down { color: var(--iv-red); }
.stat-spark { flex: 0 0 96px; width: 96px; height: 56px; position: relative; }
.stat-spark canvas { display: block; }
@media (min-width: 1500px) { .stat-spark { flex-basis: 130px; width: 130px; } }
@media (min-width: 1200px) {
    .stat-strip .row > [class*="col"]:not(:last-child)::after {
        content: ""; position: absolute; top: 8%; bottom: 8%; right: 0;
        width: 1px; background: var(--iv-border-soft);
    }
}

/* Grafik kartı başlık numaraları (Toplam Maliyet / Toplam Gelir düzeni) */
.chart-figures { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 3rem; margin-bottom: 1rem; }
.chart-figure .cf-label { font-size: 1.15rem; color: var(--iv-text); }
.chart-figure .cf-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-figure .cf-note { display: block; font-size: .85rem; color: var(--iv-text-2); margin-top: .1rem; }
.chart-figure .cf-note b { font-weight: 700; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-left: auto; align-self: flex-end; }
.chart-legend span { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; }
.chart-legend i.line { width: 26px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-legend i.line.dashed { background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px) !important; }
.chart-legend i.dot  { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.chart-box { position: relative; width: 100%; }

/* Segment düğmeleri (1G / 30G / 6A / 1Y) */
.seg { display: inline-flex; gap: .25rem; }
.seg button, .seg a {
    border: 0; background: transparent;
    color: var(--iv-text); font-weight: 500; font-size: .95rem;
    padding: .3rem .7rem; border-radius: var(--iv-radius-sm);
}
.seg button.active, .seg a.active { color: var(--iv-primary); }
.seg button:hover, .seg a:hover { background: var(--iv-bg); }

/* Mini kartlar (alt sıra) */
.mini-head { display: flex; justify-content: space-between; align-items: baseline; }
.mini-head .title { font-weight: 500; font-size: 1rem; }
.mini-head .delta { font-weight: 500; font-size: .9rem; }
.mini-value { font-size: 1.6rem; font-weight: 700; margin: .6rem 0 .2rem; font-variant-numeric: tabular-nums; }
.mini-sub { color: var(--iv-text-2); font-size: .85rem; }
.meter { height: 6px; border-radius: 3px; background: var(--iv-border-soft); overflow: hidden; margin-top: 1rem; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--iv-primary); }
.meter > span.purple { background: var(--iv-purple); }
.meter > span.green  { background: var(--iv-green); }
.meter > span.orange { background: var(--iv-orange); }
.meter > span.red    { background: var(--iv-red); }

/* ==========================================================================
   Butonlar
   ========================================================================== */
.btn {
    border-radius: var(--iv-radius-sm) !important;
    font-weight: 500;
    font-size: .9rem;
    padding: .5rem 1rem;
    box-shadow: none !important;
}
.btn-sm { padding: .3rem .7rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.25rem; font-size: 1rem; }
.btn-primary {
    background: var(--iv-primary) !important;
    border-color: var(--iv-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus { background: #0F74E0 !important; border-color: #0F74E0 !important; }
.btn-success { background: var(--iv-green) !important; border-color: var(--iv-green) !important; color: #fff !important; }
.btn-success:hover { background: #28AE7D !important; border-color: #28AE7D !important; }
.btn-danger { background: var(--iv-red) !important; border-color: var(--iv-red) !important; }
.btn-warning { background: var(--iv-orange) !important; border-color: var(--iv-orange) !important; color: #fff !important; }
.btn-secondary, .btn-light,
.btn-outline-secondary {
    background: var(--iv-soft-btn) !important;
    border-color: var(--iv-soft-btn) !important;
    color: var(--iv-text) !important;
}
.btn-secondary:hover, .btn-light:hover, .btn-outline-secondary:hover {
    background: #DDE1EC !important; border-color: #DDE1EC !important; color: var(--iv-text) !important;
}
.btn-outline-primary {
    color: var(--iv-primary) !important;
    border-color: rgba(var(--iv-primary-rgb), .45) !important;
    background: transparent !important;
}
.btn-outline-primary:hover { background: rgba(var(--iv-primary-rgb), .08) !important; }
.btn-outline-danger { color: var(--iv-red) !important; border-color: rgba(240, 80, 110, .45) !important; background: transparent !important; }
.btn-outline-danger:hover { background: rgba(240, 80, 110, .08) !important; }
.btn-outline-success { color: var(--iv-green) !important; border-color: rgba(52, 195, 143, .5) !important; background: transparent !important; }
.btn-outline-success:hover { background: rgba(52, 195, 143, .08) !important; }
.btn-outline-warning { color: #D98A1C !important; border-color: rgba(247, 164, 64, .55) !important; background: transparent !important; }
.btn-link { color: var(--iv-primary); }

/* ==========================================================================
   Formlar
   ========================================================================== */
.form-label { font-weight: 500; color: var(--iv-text-2); font-size: .85rem; margin-bottom: .35rem; }
.form-control, .form-select {
    border: 1px solid var(--iv-border);
    border-radius: var(--iv-radius-sm);
    color: var(--iv-text);
    font-size: .9rem;
    padding: .55rem .8rem;
    background-color: #fff;
}
.form-control-sm, .form-select-sm { padding: .3rem .6rem; font-size: .82rem; }
.form-control-lg { padding: .75rem 1rem; font-size: 1rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--iv-primary);
    box-shadow: 0 0 0 3px rgba(var(--iv-primary-rgb), .14);
}
.form-control::placeholder { color: #A9AFBF; }
.form-check-input:checked { background-color: var(--iv-primary); border-color: var(--iv-primary); }
.input-group-text { background: var(--iv-bg); border-color: var(--iv-border); color: var(--iv-text-2); }

/* ==========================================================================
   Tablolar
   ========================================================================== */
.table { color: var(--iv-text); margin-bottom: 0; --bs-table-striped-bg: #FAFBFD; --bs-table-hover-bg: #F5F7FC; }
.table > :not(caption) > * > * { padding: .8rem .75rem; border-bottom-color: var(--iv-border-soft); }
.table-sm > :not(caption) > * > * { padding: .55rem .6rem; }
.table thead th {
    color: var(--iv-muted);
    font-size: .74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--iv-border) !important;
    background: transparent;
    white-space: nowrap;
}
.table tbody tr { transition: background .12s ease; }
.table td.text-end, .table th.text-end { white-space: nowrap; }
.table tbody tr:hover > * { background-color: #F7F8FC; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #FAFBFD; }
.card-body.table-responsive, .card-body > .table-responsive { margin: -.4rem -.25rem; }

/* ==========================================================================
   Rozetler (yumuşak) ve uyarılar
   ========================================================================== */
.badge {
    font-weight: 500;
    font-size: .74rem;
    padding: .38em .7em;
    border-radius: 3px;
    letter-spacing: .2px;
}
.badge.bg-primary   { background: rgba(var(--iv-primary-rgb), .12) !important; color: #1170D6 !important; }
.badge.bg-success   { background: rgba(52, 195, 143, .15) !important; color: #1F9B6E !important; }
.badge.bg-danger    { background: rgba(240, 80, 110, .13) !important; color: #D63555 !important; }
.badge.bg-warning   { background: rgba(247, 164, 64, .18) !important; color: #B8710F !important; }
.badge.bg-info      { background: rgba(77, 212, 230, .18) !important; color: #178A9A !important; }
.badge.bg-secondary { background: #ECEEF4 !important; color: var(--iv-text-2) !important; }
.badge.bg-dark      { background: var(--iv-text) !important; color: #fff !important; }
.badge.bg-light     { background: var(--iv-bg) !important; color: var(--iv-text-2) !important; }
.badge.text-dark    { color: #B8710F !important; }
.sidebar .badge.bg-danger { background: var(--iv-red) !important; color: #fff !important; }

.alert {
    border: 1px solid transparent !important;
    border-left-width: 4px !important;
    border-radius: var(--iv-radius-sm) !important;
    padding: .85rem 1.1rem !important;
    font-size: .9rem;
    color: var(--iv-text);
    display: block;
}
.alert .alert-message { padding: 0; }
.alert-info    { background: #EEF6FE !important; border-color: #D6E9FC !important; border-left-color: var(--iv-primary) !important; }
.alert-success { background: #EBF9F3 !important; border-color: #CFF0E2 !important; border-left-color: var(--iv-green) !important; }
.alert-warning { background: #FEF6EA !important; border-color: #FBE5C4 !important; border-left-color: var(--iv-orange) !important; }
.alert-danger  { background: #FDEEF1 !important; border-color: #F9D3DB !important; border-left-color: var(--iv-red) !important; }
.alert-secondary { background: #F4F5F9 !important; border-color: var(--iv-border) !important; border-left-color: var(--iv-muted) !important; }
.alert.border { border-color: inherit; }

/* Sayfalama, sekmeler, liste grupları */
.page-link { color: var(--iv-primary); border-color: var(--iv-border); }
.page-item.active .page-link { background: var(--iv-primary); border-color: var(--iv-primary); }
.nav-tabs { border-bottom-color: var(--iv-border); }
.nav-tabs .nav-link { color: var(--iv-text-2); border: 0; border-bottom: 2px solid transparent; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--iv-primary); border-bottom-color: var(--iv-primary); background: transparent; }
.list-group-item { border-color: var(--iv-border-soft); }

/* Profil kartı */
.profile-card { overflow: hidden; }
.profile-cover { height: 86px; background: linear-gradient(120deg, var(--iv-sidebar) 0%, var(--iv-purple) 100%); }
.profile-card .card-body { margin-top: -48px; padding-bottom: 1rem; }
.profile-avatar {
    width: 88px !important; height: 88px !important; flex-basis: 88px !important;
    font-size: 1.8rem !important; border: 4px solid #fff;
    background: var(--iv-sidebar) !important; color: #fff !important;
    box-shadow: 0 4px 14px rgba(48, 72, 242, .25);
}
.profile-facts { list-style: none; margin: 0; padding: .5rem 1.5rem 1.25rem; border-top: 1px solid var(--iv-border-soft); }
.profile-facts li { display: flex; align-items: center; gap: .8rem; padding: .55rem 0; border-bottom: 1px dashed var(--iv-border-soft); font-size: .9rem; }
.profile-facts li:last-child { border-bottom: 0; }
.profile-facts svg { width: 16px; height: 16px; color: var(--iv-muted); flex: 0 0 16px; }
.form-control.is-valid { border-color: var(--iv-green); }
.form-control.is-invalid { border-color: var(--iv-red); }
.form-text { color: var(--iv-muted); font-size: .8rem; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }

/* Personel */
.row-passive > td { opacity: .55; }
.perm-matrix td:first-child { white-space: normal; min-width: 260px; }
.perm-matrix th { text-align: center; }
.perm-matrix th:first-child { text-align: left; }
.perm-yes { color: var(--iv-green); font-weight: 700; font-size: 1rem; }
.perm-no  { color: #CDD1DC; }

/* Boş durum */
.empty {
    color: var(--iv-muted);
    text-align: center;
    padding: 1.6rem 0;
    font-size: .9rem;
}

/* Alt bilgi */
.footer {
    background: transparent !important;
    border-top: 1px solid var(--iv-border);
    padding: 1rem 2rem !important;
}
.footer a { color: var(--iv-muted) !important; font-size: .82rem; }

/* ==========================================================================
   Giriş sayfası
   ========================================================================== */
body.login-body {
    background: var(--iv-bg);
    min-height: 100vh;
}
.login-wrap { min-height: 100vh; display: flex; }
.login-side {
    flex: 0 0 42%;
    background: linear-gradient(160deg, var(--iv-sidebar) 0%, var(--iv-sidebar-2) 100%);
    color: #fff;
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}
.login-side::after {
    content: ""; position: absolute; right: -120px; bottom: -120px;
    width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.login-side h2 { color: #fff; font-weight: 300; font-size: 2rem; line-height: 1.3; }
.login-side p { color: rgba(255, 255, 255, .78); }
.login-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-box { width: 100%; max-width: 400px; }
.login-box h1 { font-weight: 400; font-size: 1.7rem; }
@media (max-width: 900px) {
    .login-side { display: none; }
}

/* ==========================================================================
   Tablo aksiyon sütunu
   ========================================================================== */
.col-actions { width: 180px; }

/* ==========================================================================
   Mobil
   ========================================================================== */
@media (max-width: 991.98px) {
    .content { padding: 1.25rem 1rem 1.5rem; }
    .topbar-info .ti-hide-md { display: none; }
}
@media (max-width: 768px) {
    .row.g-2 > [class*="col-md-"],
    .row.g-3 > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }

    .col-actions, th.col-actions, td.col-actions { width: auto !important; min-width: 120px; }
    .display-6 { font-size: 1.5rem; word-break: break-word; }
    .card-header.d-flex { flex-wrap: wrap; gap: 8px; }

    .content > .container-fluid > .d-flex.justify-content-between:first-child {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    .content > .container-fluid > .d-flex.justify-content-between:first-child > .d-flex { flex-wrap: wrap; }
    .page-links { margin: .45rem 0 0; flex-basis: 100%; }

    .sidebar-link { padding: .8rem 1.5rem .8rem 1.45rem !important; font-size: 1rem; }
    .table td, .table th { white-space: nowrap; }
    .table td .btn, .table td form { margin-bottom: 4px; }

    .topbar-info { display: none; }
    .kstat { min-height: 80px; }
    .stat-value { font-size: 1.5rem; }
    .stat-label { font-size: 1rem; }
    .stat-strip .card-body { padding: 1.25rem; }
    .stat-strip .row > [class*="col"] + [class*="col"] { border-top: 1px solid var(--iv-border-soft); padding-top: 1rem; }
    .chart-figures { gap: .75rem 1.5rem; }
    .chart-legend { margin-left: 0; }
    .card-body { padding: 1.1rem 1.1rem; }
    .card-header { padding: 1rem 1.1rem !important; }
}
@media (max-width: 480px) {
    .container-fluid.p-0 { padding: 0 !important; }
}
