/* ------------------ THEME TOKENS ------------------ */
:root {
    /* Dark (default) */
    --bg: #272727;
    --bg-soft: #141414;
    --panel: #222;
    --panel-soft: #222;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --primary: #0ea5e9;
    --accent: #22c55e;
    --line: rgba(255,255,255,.08);
    --secil: #393939;
}

/* Light override */
[data-theme="light"] {
    --bg: #f8fafc; /* slate-50 */
    --bg-soft: #f1f5f9; /* slate-100 */
    --panel: #ffffff; /* white */
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --primary: #0ea5e9;
    --accent: #16a34a;
    --line: rgba(0,0,0,.08);
    --secil: #e6e6e6;
}
.table > :not(caption) > * > * {
    color: var(--muted);
}

  
/* ------------------ LAYOUT ------------------ */
*{margin:0px; padding:0px;}
html, body {
    height: 100%;
}

body {
    background: radial-gradient(1200px 600px at 20% -20%, var(--panel-soft) 0%, var(--bg) 60%);
    color: var(--text);
}

/* site.css içine ekleyebilirsin */
#notifMenu .list-group-item {
    background: var(--panel);
    color: var(--text);
    border-color: var(--line);
}

    #notifMenu .list-group-item:hover {
        background: rgba(255,255,255,.04);
    }


.topbar {
    background: linear-gradient(90deg, var(--panel-soft), var(--panel));
    height: 56px;
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--text) !important;
}

.badge.bg-gradient {
    background: linear-gradient(135deg, var(--primary), #7dd3fc);
    color: var(--primary);
}
a{
    color:var(--primary);
  
}
.bi-sun{
    color:orange;
}
/* Sidebar */
.layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    transform: translateX(0);
    transition: transform .25s ease;
    z-index: 1020;
}

    .sidebar .nav-link {
        color: var(--muted);
        padding: .65rem 1rem;
        border-left: 3px solid transparent;
    }

        .sidebar .nav-link:hover {
            color: var(--text);
            background: var(--line);
        }

        .sidebar .nav-link.active {
            color: #0b1320;
            background: rgba(14,165,233,.14);
            border-left-color: var(--primary);
        }

[data-theme="dark"] .sidebar .nav-link.active {
    color: #fff;
}

.muted {
    color: var(--muted) !important;
}

.line {
    border-color: var(--line) !important;
}

#clientBellCount {
    top: 10px !important;
    padding: 5px !important;
    height: 16px;
    line-height: 6px;
    left:80% !important;
}
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }
}

.content {
    flex: 1;
}

/* ------------------ ELEMENTS ------------------ */
h1, h2, h3, h4 {
    color: var(--text);
}
h2{margin-bottom:10px;}

.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
}

    .table thead th {
        color: var(--muted);
        border-bottom-color: var(--line) !important;
    }

    .table tbody tr {
        border-color: var(--line);
    }

    .table .btn {
        --bs-btn-border-color: transparent;
    }

/* Inputs */
.form-control, .form-select, .form-check-input {
    background-color: var(--panel-soft);
    border-color: var(--line);
    color: var(--text);
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 .2rem rgba(14,165,233,.15);
    }

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

    .btn-outline-primary:hover {
        background: var(--primary);
        color: #061018;
    }

/* Topbar button that follows theme colors */
.btn-theme {
    color: var(--text);
    border-color: var(--line);
    background: transparent;
}

    .btn-theme:hover {
        background: var(--line);
    }


/* Alerts */
.alert-warning {
    background: rgba(250,204,21,.12);
    border-color: rgba(250,204,21,.25);
    color: #b45309;
}

[data-theme="dark"] .alert-warning {
    color: #fde68a;
}
.avatar{ width:32px; height:32px; object-fit:cover; border-radius:6px; border:1px solid var(--line); }
.avatar-lg{ width:96px; height:96px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.thumb{ width:120px; height:72px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.mt-3{margin-bottom:1rem; margin-top:2rem !important;}
.mb-2 {
    width: 30%;
}
.progress-pill {
    width: 30%;
    height: 12px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-gradient {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .35s ease;
    box-shadow: 0 0 12px rgba(14,165,233,.25);
}

    .progress-gradient.is-complete {
        background: linear-gradient(90deg, var(--accent), #34d399);
        box-shadow: 0 0 14px rgba(34,197,94,.35);
    }

/* ---- Toastr theme uyumu ---- */
#toast-container > .toast {
    background-color: var(--panel);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

#toast-container > .toast-success {
    border-left: 4px solid var(--accent);
}

#toast-container > .toast-info {
    border-left: 4px solid var(--primary);
}

#toast-container > .toast-warning {
    border-left: 4px solid #f59e0b;
}

#toast-container > .toast-error {
    border-left: 4px solid #ef4444;
}

#toast-container > .toast .toast-message {
    line-height: 1.35;
}

/*login*/
#hero video {
    position: absolute;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    top: 0px;
    left: 0px;
    z-index: -2;
}
.glass {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.78);
    z-index: 0;
    transition: 1s;
}

.auth-card input{
    color:#111;
}
/* Basit full-screen merkezleme */
.auth-wrap {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    padding-top: 10%;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    padding: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    text-align:center;
    width:175px;
    margin:0 auto;
}

.auth-card label{color:#333;}

.auth-card input{
    background-color:transparent;
    border:1px solid #ccc;
}

    .brand h1 {
        font-size: 20px;
        margin: 0;
    }

.lg-logo {
    width: 175px;
}
#adminMsgCount {
    width: 20px;
    font-size: 11px;
    height: 18px;
    line-height: 12px;
    position: relative;
    top: 5px !important;
}
.client-msg {
    list-style: none;
    padding: 0px;
    position: relative;
    right: 8px;
    top: 8px;
}
    .client-msg .dropdown-menu {
        font-size: 14px;
    }

    /* Client mesaj açılır menü – kutuya sığdır, sar */
    .client-msg .dropdown-menu {
        width: 260px; /* istersen 280 yapabilirsin */
        max-width: 90vw; /* dar ekranlarda taşmasın */
        padding: 6px 0;
        word-break: break-word; /* uzun kelimeleri böl */
        overflow-wrap: anywhere; /* gerekirse her yerden kır */
        hyphens: auto; /* tireleme desteği */
    }

    .client-msg .dropdown-item {
        white-space: normal; /* tek satır zorlamasını kaldır */
        padding: .5rem .75rem;
    }

        .client-msg .dropdown-item strong,
        .client-msg .dropdown-item .small {
            display: block; /* tam satır kullan */
            font-weight: 600; /* başlık için */
            word-break: break-word;
            overflow-wrap: anywhere;
            hyphens: auto;
        }

    /* Opsiyon: satırlar arası ince ayraç */
    .client-msg .dropdown-menu li + li {
        border-top: 1px solid var(--bs-border-color, #e5e7eb);
    }

/* Menünün kendisi */
#adminMsgBell + .dropdown-menu {
    width: 260px; /* istersen 280 yapabilirsin */
    max-width: 90vw; /* küçük ekranda taşmasın */
    padding: 6px 0;
    word-break: break-word; /* uzun kelimeleri böl */
    overflow-wrap: anywhere; /* gerekirse her yerden kır */
    hyphens: auto; /* tireleme desteği */
    font-size:15px;
}

    /* İçerik satırları normal sarılsın */
    #adminMsgBell + .dropdown-menu .dropdown-item,
    #adminMsgBell + .dropdown-menu .dropdown-item-text {
        white-space: normal; /* tek satır zorlamasını kaldır */
        display: block;
        padding: .5rem .75rem;
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    /* Opsiyonel: satırlar arası ince ayraç */
    #adminMsgBell + .dropdown-menu li + li {
        border-top: 1px solid var(--bs-border-color, #e5e7eb);
    }

/*login*/
.err-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #0f172a
}

.err-card {
    max-width: 720px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    padding: 28px
}

.err-code {
    font-weight: 800;
    font-size: 48px;
    letter-spacing: 2px;
    margin: 0
}

.err-title {
    font-size: 22px;
    margin: .25rem 0 1rem
}

.err-muted {
    color: #6c757d
}

.btn-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 16px
}

.page-link {
    background-color: var(--bg) !important;
    color: var(--muted) !important;
    border-color: var(--line) !important;
}
.avatar-lg {
width:120px;
}



@media only screen and (max-width: 720px) {
    .mb-2, .progress-pill {
        width: 100%;
    }
    .auth-wrap{
        width:90%;
        padding-top:26%;
    }
 }

/* ============================
   Admin Listeleri (Customers/Projects) Responsive Eklemeler
   ============================ */

/* Toolbar (üstteki buton + filtre formu) */
.d-flex.justify-content-between.align-items-center.mb-3 {
    gap: .75rem;
}

@media (max-width: 768px) {
    .d-flex.justify-content-between.align-items-center.mb-3 {
        flex-direction: column;
        align-items: stretch !important;
    }

        .d-flex.justify-content-between.align-items-center.mb-3 > a.btn {
            width: 100%;
        }

        .d-flex.justify-content-between.align-items-center.mb-3 form {
            width: 100%;
            margin: 0 !important;
        }

            .d-flex.justify-content-between.align-items-center.mb-3 form .row {
                --bs-gutter-x: .5rem;
            }

            .d-flex.justify-content-between.align-items-center.mb-3 form .col-auto,
            .d-flex.justify-content-between.align-items-center.mb-3 form .col-md-3,
            .d-flex.justify-content-between.align-items-center.mb-3 form .col-md-4 {
                flex: 1 1 100%;
                width: 100%;
            }

            .d-flex.justify-content-between.align-items-center.mb-3 form .form-control,
            .d-flex.justify-content-between.align-items-center.mb-3 form .form-select,
            .d-flex.justify-content-between.align-items-center.mb-3 form .btn {
                width: 100%;
            }
}

/* Tablo genel iyileştirmeler */
.table {
    border-radius: 10px;
    overflow: hidden;
}

    .table thead th a {
        color: var(--muted);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: .35rem;
    }

        .table thead th a:hover {
            color: var(--text);
        }

/* Görsel/Avatar boyutları küçük ekranlarda küçülsün */
@media (max-width: 768px) {
    .thumb {
        width: 88px;
        height: 56px;
    }

    .avatar {
        width: 28px;
        height: 28px;
    }
}

/* Aksiyon butonları satır sonunda taşma yapmasın */
.table td.text-end .btn {
    margin-inline-start: .35rem;
    margin-bottom: .35rem;
}

.card-header, .card-body{
   background-color: var(--bg);
   outline:1px solid var(--line);
   color: var(--text);
}
.nav-tabs {
    border-bottom: 1px solid var(--secil) !important;
}
.nav-tabs .nav-link {
    border: var(--muted) solid transparent;
    color: var(--primary);
}
    .nav-link.active {
       background:var(--secil) !important;
        color: var(--primary) !important;
    }

.list-group-item {
    background-color: var(--bg);
    color: var(--muted);
}
#chatBox, #msgInput {
    background-color: var(--bg) !important;
    color: var(--muted) !important;
    border: 1px solid var(--line) !important;
}

@media (max-width: 768px) {
    .table td.text-end {
        text-align: left !important;
        white-space: normal;
    }

        .table td.text-end .btn {
            margin-inline-start: 0;
            margin-right: .35rem;
        }
    .mblde {display:none;}

    .table-responsive .table.table-card {
        display: block;
        border-collapse: separate;
        border-spacing: 0 10px; /* kartlar arası boşluk */
    }

        .table-responsive .table.table-card thead {
            display: none !important; /* başlık satırını gizle */
        }

        .table-responsive .table.table-card tbody {
            display: block;
        }

        .table-responsive .table.table-card tr {
            display: block;
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
            overflow: hidden;
        }

            .table-responsive .table.table-card tr + tr {
                margin-top: 10px;
            }
            .col-4{width:100%;}
        /* Hücreyi satır yap, solda label (otomatik JS ile gelecek), sağda değer */
        .table-responsive .table.table-card td {
            display: grid;
            grid-template-columns: 42% 1fr; /* solda etiket, sağda değer */
            gap: 24px;
            border: 0;
            padding: 8px 0;
            align-items: center;
            color: var(--text);
        }

            .table-responsive .table.table-card td::before {
                content: attr(data-label);
                color: var(--muted);
                font-size: .92rem;
                line-height: 1.2;
                word-break: break-word;
            }

            /* Görsel/Logo hücresi: label’ı gizle, görseli üstte tam genişlikte göster */
            .table-responsive .table.table-card td:first-child {
                display: block;
                padding-top: 0;
                padding-bottom: 8px;
            }

                .table-responsive .table.table-card td:first-child::before {
                    content: none;
                }

                .table-responsive .table.table-card td:first-child img.thumb {
                    width: 100%;
                    height: auto;
                    max-height: 180px;
                    object-fit: cover;
                    border-radius: 8px;
                    border: 1px solid var(--line);
                }

                .table-responsive .table.table-card td:first-child img.avatar {
                    width: 56px;
                    height: 56px;
                    border-radius: 10px;
                    border: 1px solid var(--line);
                }

            /* Aksiyon hücresi: butonları satır içine sar, sola hizala */
            .table-responsive .table.table-card td.text-end {
                text-align: left !important;
                display: block;
            }

                .table-responsive .table.table-card td.text-end::before {
                    content: "Aksiyonlar";
                    display: inline-block;
                    margin-bottom: 6px;
                    margin-right: 10px;
                }

                .table-responsive .table.table-card td.text-end .btn {
                    margin-right: .4rem;
                    margin-bottom: .4rem;
                }

    /* Ek görsel/ikon boyut ayarı */
    .thumb {
        width: 100%;
        height: auto;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }
}

/* Küçük ekranlarda bazı kolonları daralt/tercihen gizle (ID ve Oluşturulma) */
@media (max-width: 576px) {
    /* ID sütunu */
    table.table tr > *:nth-child(2) { /* Görsel/Logo 1. kolonsa ID 2. olur */
        width: 1%;
        white-space: nowrap;
    }
    /* Oluşturulma sütunu: en küçük ekranda gizle */
    table.table tr > *:nth-last-child(2) { /* "Aksiyonlar"dan bir önceki kolon */
        display: none;
    }
    .deben{
        display:block !important;
    }
    .deben .text-muted{text-align:center; font-size:13px; margin-bottom:20px;}
}

/* Tablo başlıkları üstte sabit kalsın (çok içerikte) */
.table-responsive {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.table thead th {
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
}

/* Pagination mobil için daha ergonomik */
.pagination .page-link {
    background-color: var(--panel-soft) !important;
    border-color: var(--line) !important;
    color: var(--muted) !important;
}

@media (max-width: 576px) {
    .pagination {
        gap: .25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

        .pagination .page-item .page-link {
            padding: .35rem .55rem;
            font-size: .9rem;
            min-width: 36px;
            text-align: center;
        }
}

/* Topbar mobilde sol menü butonu ve marka hizası */
@media (max-width: 992px) {
    .topbar .brand {
        font-size: 1rem;
    }
}

/* Sidebar açıkken mobilde içerik kaydırılmasın (senin JS toggle ile uyumlu) */
@media (max-width: 992px) {
    body.sidebar-open {
        overflow: hidden;
    }
}
