/* Tekirdağ TEKMER panelleri: ortak görünüm (admin, firma, hakem). */
:root {
    --tk-purple: #3f2399;
    --tk-purple-dark: #2b1479;
    --tk-purple-soft: #ece7ff;
    --tk-bg: #f3f3f7;
    --tk-card: #ffffff;
    --tk-text: #1f1b2e;
    --tk-muted: #7a7690;
    --tk-radius: 1rem;
    --tk-sidebar: 17rem;
    --tk-shadow: 0 2px 16px rgba(45, 25, 120, 0.07);
}

body.fi-body {
    background: var(--tk-bg);
    color: var(--tk-text);
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Yan menü (masaüstü) ---------- */
@media (min-width: 1024px) {
    .fi-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        margin-top: -64px;           /* üst çubuğun altından yukarı çekilir; menü tam boy olur */
        width: var(--tk-sidebar);
        z-index: 40;
        background: linear-gradient(180deg, #43249f 0%, #2d1478 100%);
        box-shadow: none;
        border: 0;
        --tw-ring-shadow: 0 0 #0000;
    }

    .fi-topbar-ctn {
        padding-left: var(--tk-sidebar);
        background: var(--tk-bg);
    }

    /* Marka adı üst çubuktan yan menünün başına taşınır. */
    .fi-topbar .fi-topbar-start { display: none; }

    .fi-sidebar-header-ctn { display: block; height: auto; }
    .fi-sidebar-header {
        display: flex;
        align-items: center;
        height: auto;
        min-height: 5rem;
        padding: 1.25rem 1.5rem 0.5rem;
        background: transparent;
        box-shadow: none;
    }
    .fi-sidebar-header .fi-logo {
        color: #fff;
        font-weight: 700;
        font-size: 1.1rem;
        line-height: 1.3;
        height: auto !important;
        white-space: normal;
    }
}

/* ---------- Yan menü (mobil çekmece) ---------- */
@media (max-width: 1023.98px) {
    .fi-sidebar {
        background: linear-gradient(180deg, #43249f 0%, #2d1478 100%);
        border: 0;
        --tw-ring-shadow: 0 0 #0000;
    }
    .fi-sidebar-header-ctn { height: auto; }
    .fi-sidebar-header {
        height: auto;
        min-height: 4rem;
        padding: 1rem 1.25rem 0.5rem;
        background: transparent;
        box-shadow: none;
    }
    .fi-sidebar-header .fi-logo {
        color: #fff;
        font-weight: 700;
        font-size: 1.05rem;
        line-height: 1.3;
        height: auto !important;
        white-space: normal;
    }
    .fi-sidebar-close-overlay { background: rgba(20, 10, 60, 0.5); }
    .fi-sidebar-header .fi-icon-btn { color: #fff; }
}

.fi-sidebar-header-controls { padding: 0.25rem 1.25rem 0.5rem; }
.fi-sidebar-header-controls button,
.fi-sidebar-header-controls .fi-tenant-menu-trigger {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 0.85rem;
}
.fi-sidebar-header-controls * { color: #fff; }

.fi-sidebar-nav {
    padding: 1rem 0 1.5rem 1rem;      /* sağ kenar boş: aktif öğe menü kenarına kadar uzanır */
    overflow-x: hidden;
    scrollbar-gutter: auto;
}
.fi-sidebar-nav-groups { row-gap: 0.15rem; margin-inline: 0; }
.fi-sidebar-group { gap: 0.15rem; }
.fi-sidebar-group-label,
.fi-sidebar-group-button .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.fi-sidebar-group-btn { padding-right: 1rem; }
.fi-sidebar-group-btn * { color: rgba(255, 255, 255, 0.55); }
.fi-sidebar-group-items { row-gap: 0.15rem; }

.fi-sidebar-item { position: relative; }
.fi-sidebar-item-btn {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    padding: 0.8rem 1.1rem;
    border-radius: 2rem 0 0 2rem;
    gap: 0.9rem;
    transition: background 0.15s, color 0.15s;
}
.fi-sidebar-item-btn .fi-sidebar-item-icon,
.fi-sidebar-item-btn .fi-sidebar-item-label { color: inherit; }
.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--tk-bg);
    color: var(--tk-purple);
    font-weight: 600;
    position: relative;
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label { color: var(--tk-purple); }
/* Aktif öğenin altına ve üstüne "girinti" köşeleri */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::after {
    content: '';
    position: absolute;
    right: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: transparent;
    pointer-events: none;
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before {
    top: -1.75rem;
    border-bottom-right-radius: 1.75rem;
    box-shadow: 0.5rem 0.5rem 0 0.5rem var(--tk-bg);
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::after {
    bottom: -1.75rem;
    border-top-right-radius: 1.75rem;
    box-shadow: 0.5rem -0.5rem 0 0.5rem var(--tk-bg);
}
.fi-sidebar-item-badge, .fi-sidebar .fi-badge { border-radius: 999px; }

/* Sayfa sekmeleri (ör. firma kartındaki Tahsisler, Borçlar...): üstteki yol kutusuyla aynı beyaz kutu; sığmayan sekmeler alt satıra geçer. */
.fi-sc-tabs:not(.fi-contained) > .fi-tabs {
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.5rem 0.75rem;
    box-shadow: var(--tk-shadow);
    flex-wrap: wrap;
    overflow: visible;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-inline: 0 !important;
    margin-top: 0 !important; /* Filament sekmeyi üstteki bloğa yapıştırmak için eksi boşluk verir; kutular ayrı dursun */
}

/* ---------- Üst çubuk ---------- */
.fi-topbar {
    background: transparent;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
    border: 0;
    /* Zil/mesaj rozetleri üstten kesilmesin diye satır biraz aşağıda durur. */
    padding-top: 1.25rem;
    height: calc(4rem + 1.25rem);
}

/* ---------- İçerik ---------- */
.fi-main { padding-top: 0.5rem; }
.fi-header-heading { font-weight: 700; color: var(--tk-text); letter-spacing: -0.01em; }
.fi-breadcrumbs-item-label { color: var(--tk-muted); }

/* Kartlar: bölümler, tablolar, istatistikler, hesap bilgisi, açılır pencereler */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-widget .fi-section,
.fi-fi-ctn,
.fi-in-section {
    background: var(--tk-card);
    border: 0;
    border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow);
    --tw-ring-shadow: 0 0 #0000;
}
/* Dış sarmalayıcı (fi-sc-section) kart değildir; yalnızca içindeki kutular karttır. */
.fi-sc-section { background: transparent; box-shadow: none; border-radius: 0; }
/* İstatistik kutularını saran dış bölüm kart olmasın (içerdeki her kutu kendi kartı). */
.fi-section.fi-section-not-contained,
.fi-wi-widget .fi-section.fi-section-not-contained {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.fi-modal-window { border-radius: 1.25rem; }
.fi-ta-header-cell,
.fi-ta-table thead th { background: #f7f5ff; }
.fi-ta-ctn { overflow: hidden; }

/* Düğmeler: yuvarlak, mor */
.fi-btn { border-radius: 999px; font-weight: 600; }
.fi-btn.fi-color-primary:not(.fi-outlined) { background: var(--tk-purple); color: #fff; }
.fi-btn.fi-color-primary:not(.fi-outlined) .fi-btn-label,
.fi-btn.fi-color-primary:not(.fi-outlined) svg { color: #fff; }
.fi-btn.fi-color-primary:not(.fi-outlined):hover { background: var(--tk-purple-dark); }
.fi-icon-btn { border-radius: 0.75rem; }

/* Alanlar */
.fi-input-wrp,
.fi-fo-select .fi-input-wrp,
.fi-fo-text-input .fi-input-wrp,
.fi-fo-textarea .fi-input-wrp {
    border-radius: 0.8rem;
}

/* Sekmeler ve filtre "çipleri": hap biçimli, aktif olan lavanta */
.fi-tabs { background: transparent; box-shadow: none; --tw-ring-shadow: 0 0 #0000; gap: 0.5rem; }
.fi-tabs-item { border-radius: 999px; padding: 0.45rem 1rem; font-weight: 500; }
.fi-tabs-item.fi-active { background: var(--tk-purple-soft); color: var(--tk-purple); }
.fi-tabs-item.fi-active .fi-tabs-item-label,
.fi-tabs-item.fi-active .fi-tabs-item-icon { color: var(--tk-purple); }
.fi-badge { border-radius: 999px; }

/* Bildirimler */
.fi-no-notification { border-radius: 1rem; }

/* ---------- Giriş sayfası ---------- */
.fi-simple-layout {
    background: linear-gradient(135deg, #43249f 0%, #2d1478 60%, #20105c 100%);
}
.fi-simple-main {
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(10, 4, 40, 0.35);
    --tw-ring-shadow: 0 0 #0000;
}
.fi-simple-header-heading { font-weight: 700; }


/* ---------- Üst çubuk: sayfa başlığı + mesaj/uyarı ikonları ---------- */
.tk-topbar-title { display: none; }
.tk-topbar-icons { display: flex; align-items: center; gap: 0.6rem; }
.tk-icon-btn {
    position: relative;
    width: 2.6rem; height: 2.6rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border-radius: 0.85rem;
    color: var(--tk-purple);
    box-shadow: var(--tk-shadow);
    cursor: default;
}
.tk-icon-btn svg { width: 1.35rem; height: 1.35rem; }
.tk-icon-badge {
    position: absolute; top: -0.3rem; right: -0.3rem;
    min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.68rem; font-weight: 700; line-height: 1.2rem; text-align: center;
    color: #fff;
    border: 2px solid var(--tk-bg);
    box-sizing: content-box;
}
.tk-badge-orange { background: #f59e0b; }
.tk-badge-red { background: #ef4444; }

@media (min-width: 1024px) {
    /* Başlık üst çubukta; sayfadaki asıl h1 yalnızca ekran okuyucular için kalır. */
    body.tk-has-title .tk-topbar-title {
        display: block;
        font-size: 1.6rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--tk-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 28rem;
        margin-right: 1rem;
    }
    body.tk-has-title .fi-header-heading {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap;
    }
    .fi-topbar-end { margin-left: auto; gap: 1rem; }
}
@media (max-width: 479.98px) {
    .tk-topbar-icons { gap: 0.4rem; }
    .tk-icon-btn { width: 2.2rem; height: 2.2rem; }
}
@media (max-width: 479.98px) {
    .tk-icon-btn { width: 2rem; height: 2rem; border-radius: 0.7rem; }
    .tk-icon-btn svg { width: 1.1rem; height: 1.1rem; }
    .tk-icon-badge { top: -0.45rem; right: -0.35rem; min-width: 1rem; height: 1rem; line-height: 1rem; font-size: 0.6rem; }
    .fi-topbar-end { gap: 0.4rem; min-width: 0; }
}

/* İstatistik kutuları: altta fazladan boş beyaz alan kalmasın; değerler tek satırda dursun. */
.fi-wi-stats-overview-stat { padding-bottom: 1.25rem; }
.fi-wi-stats-overview-stat-value { font-size: 1.6rem; line-height: 2rem; overflow-wrap: break-word; min-width: 0; }
/* Dört kutu yan yana iken uzun durum yazısı ("Değerlendirmede") kelime ortasından bölünmesin */
@media (min-width: 1024px) { .fi-wi-stats-overview-stat-value { font-size: 1.3rem; line-height: 1.75rem; } }
.fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat-content { min-width: 0; }

/* ---------- Renkli sayaç kutuları (Jobie tarzı) ---------- */
.fi-grid-col:nth-child(5n+1) .fi-wi-stats-overview-stat { --tk-tile: #40189d; }
.fi-grid-col:nth-child(5n+2) .fi-wi-stats-overview-stat { --tk-tile: #4aa8f7; }
.fi-grid-col:nth-child(5n+3) .fi-wi-stats-overview-stat { --tk-tile: #1fc98a; }
.fi-grid-col:nth-child(5n+4) .fi-wi-stats-overview-stat { --tk-tile: #8bc53f; }
.fi-grid-col:nth-child(5n+5) .fi-wi-stats-overview-stat { --tk-tile: #ff9f1c; }
.fi-wi-stats-overview-stat {
    background: var(--tk-tile, #40189d);
    box-shadow: var(--tk-shadow);
}
.fi-wi-stats-overview-stat,
.fi-wi-stats-overview-stat * { color: #fff !important; }
.fi-wi-stats-overview-stat-label,
.fi-wi-stats-overview-stat-description { opacity: 0.9; }

/* ---------- Sayfa başlık çubuğu (Jobie tarzı): başlık + ev ikonu + yol, beyaz yuvarlak çubuk ---------- */
/* Başlık üst çubukta (hamburger/menünün yanında) görünür; beyaz çubukta yalnızca yol (breadcrumb) kalır. */
body.tk-has-title .tk-topbar-title {
    display: block;
    font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; line-height: 2rem;
    color: var(--tk-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0; max-width: 28rem; margin-right: 1rem;
}
body.tk-has-title .fi-header-heading {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 1023.98px) { body.tk-has-title .tk-topbar-title { font-size: 1.35rem; margin-right: 0.5rem; flex: 1 1 auto; } }
@media (max-width: 1023.98px) {
    /* Telefon/tablet: hamburger solda, başlık yanında; arama alanı yer açmak için gizlenir. */
    .fi-topbar .fi-topbar-open-sidebar-btn, .fi-topbar .fi-topbar-close-sidebar-btn { order: -1; }
    .fi-topbar .fi-global-search, .fi-topbar [class*="global-search"] { display: none; }
    /* Filament yolu (breadcrumb) küçük ekranda gizler; başlık çubuğunda hep görünsün. */
    .fi-header .fi-breadcrumbs { display: block; }
}
@media (max-width: 639.98px) { body.tk-has-title .tk-topbar-title { font-size: 1.2rem; } }
.fi-header {
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.7rem 1.25rem;
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    box-shadow: var(--tk-shadow);
}
.fi-header > div:first-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}
.fi-header .fi-header-heading {
    order: 1;
    font-size: 1.15rem;
    line-height: 1.5rem;
    font-weight: 700;
    color: var(--tk-text);
    margin: 0;
}
.fi-header .fi-breadcrumbs { order: 2; margin: 0; }
.fi-header .fi-breadcrumbs-list { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; }
.fi-header .fi-breadcrumbs-list::before {
    content: "";
    width: 1.05rem; height: 1.05rem;
    background: #8a8aa0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25'/%3E%3C/svg%3E") center/contain no-repeat;
}
.fi-header .fi-breadcrumbs-item-label { color: #8a8aa0; font-weight: 500; }
.fi-header .fi-breadcrumbs-item-label[aria-current="page"] { color: var(--tk-purple); font-weight: 600; }
.fi-header .fi-header-actions-ctn { margin-left: auto; }
@media (max-width: 639.98px) {
    .fi-header { padding: 0.75rem 1rem; }
    .fi-header > div:first-child { gap: 0.15rem 1rem; }
}
.fi-header, .fi-header .fi-header-heading { text-align: left; }
.fi-header > div:first-child { justify-content: flex-start; }
@media (min-width: 1024px) { .fi-page-header-main-ctn { margin-top: -1rem; } }
@media (max-width: 639.98px) {
    .fi-header { justify-content: flex-start; }
    .fi-header > div:first-child { width: 100%; }
}

/* Bölümü (Section) olmayan formlar da kart içinde görünsün; tüm form sayfaları aynı görünür. */
form.fi-sc-form:not(:has(.fi-section)) {
    background: var(--tk-card);
    border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow);
    padding: 1.5rem;
}
@media (max-width: 639.98px) { form.fi-sc-form:not(:has(.fi-section)) { padding: 1rem; } }
.fi-header .fi-header-subheading { display: none; }
/* Açıklama / uyarı kutusu: başlık çubuğunun altında, solda turuncu çizgili beyaz kutu */
.tk-alert {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: #fff;
    border-radius: 0.85rem;
    border-left: 4px solid #ff9f1c;
    padding: 0.85rem 1.25rem;
    margin: -0.5rem 0 0.75rem;
    font-size: 0.8rem; line-height: 1.5; color: #7b7b8f;
    box-shadow: var(--tk-shadow);
}
.tk-alert-close { flex: none; font-size: 1.4rem; line-height: 1; color: #6b6b80; background: none; border: 0; cursor: pointer; padding: 0 0.15rem; }
.tk-alert-close:hover { color: var(--tk-purple); }
/* Dolu renkli uyarı kutusu (örn. kabul/ret kararı): zemin renkli, yazı beyaz. */
.tk-alert[data-tone="success"] { background: var(--success-600); border-left-color: var(--success-600); color: #fff; }
.tk-alert[data-tone="danger"] { background: var(--danger-600); border-left-color: var(--danger-600); color: #fff; }
.tk-alert[data-tone] .tk-alert-close, .tk-alert[data-tone] .tk-alert-close:hover { color: #fff; }

/* ---------- Üst çubuk: Hoş geldin + ad ---------- */
.tk-welcome { display: none; flex-direction: column; text-align: right; line-height: 1.25; margin-right: 0.25rem; }
.tk-welcome-hi { font-size: 0.7rem; color: #8a8aa0; }
.tk-welcome-name { font-size: 0.9rem; font-weight: 700; color: var(--tk-text); white-space: nowrap; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 640px) { .tk-welcome { display: flex; } }

/* ---------- Zil (Filament bildirim düğmesi) mesaj ikonuyla aynı görünsün ---------- */
.fi-topbar-database-notifications-btn {
    position: relative;
    width: 2.6rem; height: 2.6rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff !important;
    border-radius: 0.85rem;
    color: var(--tk-purple);
    box-shadow: var(--tk-shadow);
}
.fi-topbar-database-notifications-btn svg { width: 1.35rem; height: 1.35rem; }
.fi-topbar-database-notifications-btn .fi-icon-btn-badge-ctn {
    position: absolute; top: -0.3rem; right: -0.3rem; inset-inline-end: -0.3rem;
}
.fi-topbar-database-notifications-btn .fi-badge {
    background: #ef4444; color: #fff; border: 2px solid var(--tk-bg);
    box-sizing: content-box; min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem;
    border-radius: 999px; font-size: 0.68rem; font-weight: 700; justify-content: center;
    --tw-ring-shadow: 0 0 #0000;
}
a.tk-icon-btn { cursor: pointer; text-decoration: none; }
@media (max-width: 479.98px) {
    .fi-topbar-database-notifications-btn { width: 2rem; height: 2rem; border-radius: 0.7rem; }
    .fi-topbar-database-notifications-btn svg { width: 1.1rem; height: 1.1rem; }
}

/* ---------- Mesajlaşma ---------- */
.tk-chat-card { background: #fff; border-radius: 1.25rem; box-shadow: var(--tk-shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.tk-chat-layout { display: grid; grid-template-columns: 18rem 1fr; gap: 1.25rem; align-items: start; }
.tk-chat-list { margin-bottom: 0; }
.tk-chat-label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--tk-text); }
.tk-chat-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; }
.tk-chat-firms { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.tk-chat-firm { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; text-align: left; padding: 0.55rem 0.75rem; border-radius: 0.75rem; font-size: 0.9rem; cursor: pointer; }
.tk-chat-firm:hover, .tk-chat-firm.is-active { background: rgba(64, 24, 157, 0.08); color: var(--tk-purple); font-weight: 600; }
.tk-thread { max-height: 26rem; min-height: 8rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-right: 0.25rem; }
.tk-msg { max-width: 80%; align-self: flex-start; background: #f1eff9; border-radius: 1rem 1rem 1rem 0.25rem; padding: 0.6rem 0.85rem; }
.tk-msg-mine { align-self: flex-end; background: var(--tk-purple); color: #fff; border-radius: 1rem 1rem 0.25rem 1rem; }
.tk-msg-meta { font-size: 0.7rem; opacity: 0.7; margin-bottom: 0.2rem; }
.tk-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; }
.tk-muted { color: #8a8a9e; font-size: 0.9rem; }
.tk-error { color: #dc2626; font-size: 0.8rem; margin: 0.25rem 0 0; }
.tk-composer { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; }
.tk-composer-input { width: 100%; border: 1px solid #dcd9ea; border-radius: 0.85rem; padding: 0.6rem 0.8rem; font: inherit; background: #fff; }
.tk-composer-input:focus { outline: 2px solid var(--tk-purple); outline-offset: 0; }
@media (max-width: 1023.98px) {
    .tk-chat-layout { grid-template-columns: 1fr; }
    .tk-msg { max-width: 92%; }
}

/* ---------- İşletici kuruluş formları ---------- */
.tk-op-form .fi-sc { gap: 1.25rem; }
.tk-op-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }
.tk-op-actions .tk-muted { margin-right: auto; }

/* ---------- Firma kartı (yönetim > Firmalar > firma) ---------- */
.tk-firm-card { background: #fff; border-radius: 1rem; box-shadow: var(--tk-shadow); border-top: 3px solid #9ca3af; padding: 1.5rem; }
.tk-firm-green { border-top-color: #22c55e; }
.tk-firm-red { border-top-color: #ef4444; }
.tk-firm-gray { border-top-color: #9ca3af; }
.tk-firm-main { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.tk-firm-avatar { flex: none; width: 7rem; height: 7rem; border-radius: 999px; background: #33c1f7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; }
.tk-firm-info { flex: 1 1 18rem; min-width: 0; }
.tk-firm-name { font-size: 1.6rem; font-weight: 700; line-height: 2rem; margin: 0; overflow-wrap: anywhere; }
.tk-firm-status { display: inline-block; vertical-align: middle; margin-left: 0.5rem; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; background: #f1f1f5; color: #6b6b80; }
.tk-firm-green .tk-firm-status { background: #dcfce7; color: #15803d; }
.tk-firm-red .tk-firm-status { background: #fee2e2; color: #b91c1c; }
.tk-firm-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.35rem; color: #8a8aa0; font-size: 0.95rem; }
.tk-firm-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.tk-firm-ico { width: 1.1rem; height: 1.1rem; flex: none; color: inherit; }
.tk-firm-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 1rem; }
.tk-firm-facts small, .tk-firm-stat small { display: block; font-size: 0.8rem; }
.tk-firm-facts strong { display: block; font-weight: 700; font-size: 0.95rem; }
.tk-firm-stats { display: flex; flex-direction: column; gap: 0.75rem; margin-left: auto; }
.tk-firm-stat { min-width: 8.5rem; text-align: center; background: var(--tk-purple); color: #fff; border-radius: 0.75rem; padding: 0.6rem 1rem; }
.tk-firm-stat small { opacity: 0.9; }
.tk-firm-stat strong { display: block; font-size: 1rem; font-weight: 700; }
@media (max-width: 639.98px) {
    .tk-firm-card { padding: 1rem; }
    .tk-firm-avatar { width: 4.5rem; height: 4.5rem; font-size: 2rem; }
    .tk-firm-stats { flex-direction: row; width: 100%; margin-left: 0; }
    .tk-firm-stat { flex: 1; }
}
/* Firma "Hareket geçmişi" tablosu */
.tk-history-wrap { overflow-x: auto; }
.tk-history { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tk-history th { text-align: left; font-weight: 600; color: #6b7280; padding: .5rem 1rem .5rem 0; }
.tk-history td { padding: .625rem 1rem .625rem 0; border-top: 1px solid rgba(107, 114, 128, .18); vertical-align: top; }
.tk-history td:first-child { white-space: nowrap; color: #4b5563; }

/* Yönetim paneli: son kayıtlar kutuları */
.tk-recent-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .tk-recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-recent-box { background: #fff; border-radius: 1rem; box-shadow: var(--tk-shadow); padding: 1.25rem 1.5rem 1.5rem; min-width: 0; overflow: hidden; }
.tk-recent-title { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; }
.tk-recent-row { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; }
.tk-recent-row::before { content: ""; position: absolute; left: -1.5rem; top: 0.35rem; bottom: 0.35rem; width: 0.4rem; border-radius: 0 0.5rem 0.5rem 0; background: #9ca3af; }
.tk-recent-info::before { background: #38bdf8; }
.tk-recent-warning::before { background: #eab308; }
.tk-recent-success::before { background: #22c55e; }
.tk-recent-danger::before { background: #ef4444; }
.tk-recent-primary::before { background: var(--tk-purple); }
.tk-recent-text { flex: 1 1 auto; min-width: 0; }
.tk-recent-name { font-size: 0.95rem; padding-bottom: 0.25rem; border-bottom: 1px solid #ececf2; overflow-wrap: anywhere; }
.tk-recent-meta { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: 0.3rem; font-size: 0.9rem; color: #8a8aa0; }
.tk-recent-meta span { overflow-wrap: anywhere; }
.tk-recent-btn { flex: none; background: var(--tk-purple); color: #fff; border-radius: 0.6rem; padding: 0.5rem 1.1rem; font-size: 0.9rem; text-decoration: none; }
.tk-recent-btn:hover { background: var(--tk-purple-dark); }
.tk-recent-empty { color: #8a8aa0; font-size: 0.9rem; margin: 0; }

/* Pasta grafikleri: kart içi boşluklar küçük, böylece 5 grafik tek sırada büyük kalır */
.fi-wi-chart .fi-section-header { padding: 0.85rem 0.85rem 0.6rem; }
.fi-wi-chart .fi-section-header-heading { font-size: 0.95rem; line-height: 1.25rem; }
.fi-wi-chart .fi-section-header-description { font-size: 0.75rem; line-height: 1rem; }
.fi-wi-chart .fi-section-content-ctn > .fi-section-content,
.fi-wi-chart .fi-section-content { padding: 0.5rem 0.4rem 0.75rem; }
.fi-wi-chart { height: 100%; }
.fi-wi-chart .fi-section { height: 100%; }
.fi-wi-chart .fi-section-header { min-height: 4.25rem; }
/* Tüm pastalar aynı yükseklikte: gösterge ne kadar uzun olursa olsun pasta aynı kalır */
.fi-wi-chart .fi-wi-chart-canvas-ctn { height: 280px; position: relative; }


/* Telefon (tel:) ve e-posta (mailto:) bağlantıları: tıklanır ama yazı biçimi değişmez (mavi renk / alt çizgi yok). */
a[href^="tel:"], a[href^="mailto:"], a.tk-contact-link,
a[href^="tel:"]:hover, a[href^="mailto:"]:hover, a.tk-contact-link:hover {
    color: inherit !important;
    text-decoration: none !important;
    font: inherit;
}

/* Okunmamış (yönetici henüz açmamış) kayıt: seçili satırdaki ince çizginin yeşil hali. */
.fi-ta-row.tk-unread > *:first-child { box-shadow: inset 2px 0 0 0 var(--success-600, #16a34a); }
