/**
 * CordeoCRM uygulama kabuğu 24.8.54
 * WordPress tema HTML kabuğunun yerine tüm CRM iç sayfalarında kullanılan tek iskelet.
 */
:root {
    --ccrm-app-header-height: 76px;
    --ccrm-menu-width: 76px;
}

html:has(body.ccrm-app-document) {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    background: #fff;
}

html body.ccrm-app-document {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #fff;
    color: var(--ccrm-text, #202a36);
    font-family: var(--ccrm-font, Inter, "Segoe UI", Arial, sans-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html body.ccrm-app-document .ccrm-app-frame {
    box-sizing: border-box;
    width: calc(100% - var(--ccrm-menu-width));
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    margin: 0 0 0 var(--ccrm-menu-width);
    padding: 0;
    background: #fff;
}

html body.ccrm-app-document .ccrm-app-header {
    position: sticky;
    box-sizing: border-box;
    width: calc(100% + var(--ccrm-menu-width));
    max-width: none;
    top: 0;
    z-index: var(--ccrm-layer-header, 900000);
    height: var(--ccrm-app-header-height);
    margin-left: calc(-1 * var(--ccrm-menu-width));
    padding-left: var(--ccrm-menu-width);
    border: 0;
    border-bottom: 1px solid var(--ccrm-border-soft, #edf1f5);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
    backdrop-filter: blur(10px);
}

html body.ccrm-app-document .ccrm-app-header__inner {
    display: flex;
    box-sizing: border-box;
    width: min(var(--ccrm-page-width, 1180px), calc(100% - 32px));
    max-width: var(--ccrm-page-width, 1180px);
    min-width: 0;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 0 auto;
    padding: 0;
}

html body.ccrm-app-document .ccrm-app-header__brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    text-decoration: none;
}

html body.ccrm-app-document .ccrm-app-header__logo-image {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 42px;
    object-fit: contain;
}

html body.ccrm-app-document .ccrm-app-header__account {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

html body.ccrm-app-document .ccrm-app-header__identity,
html body.ccrm-app-document .ccrm-app-header__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

html body.ccrm-app-document .ccrm-app-header__identity {
    gap: 8px;
    color: #94a3b8;
    font-size: 11.5px;
    line-height: 1.2;
}

html body.ccrm-app-document .ccrm-app-header__company {
    max-width: 250px;
    overflow: hidden;
    color: #64748b;
    font-weight: 500;
    text-overflow: ellipsis;
}

html body.ccrm-app-document .ccrm-app-header__separator { color: #cbd5e1; }

html body.ccrm-app-document .ccrm-app-header__user {
    appearance: none;
    max-width: 170px;
    min-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
    font: inherit;
    text-overflow: ellipsis;
    cursor: pointer;
}

html body.ccrm-app-document .ccrm-app-header__user:hover,
html body.ccrm-app-document .ccrm-app-header__user:focus-visible {
    color: #334155;
    outline: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html body.ccrm-app-document .ccrm-app-header__role {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 9.5px;
    font-weight: 500;
}

html body.ccrm-app-document .ccrm-app-header__links { gap: 26px; }
html body.ccrm-app-document .ccrm-app-header__links a {
    color: #374151;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
}
html body.ccrm-app-document .ccrm-app-header__links a:hover,
html body.ccrm-app-document .ccrm-app-header__links a:focus-visible {
    color: var(--ccrm-primary, #2563eb);
    outline: 0;
    text-decoration: none;
}

html body.ccrm-app-document .ccrm-app-main {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: calc(100vh - var(--ccrm-app-header-height));
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
}

html body.ccrm-app-document .ccrm-app-content {
    box-sizing: border-box;
    width: min(var(--ccrm-page-width, 1180px), calc(100% - 32px));
    max-width: var(--ccrm-page-width, 1180px);
    min-width: 0;
    margin: 0 auto;
    padding: 28px 0 48px;
}

/* WordPress sayfalarındaki Gutenberg taşıyıcıları uygulama iskeletine karışmaz. */
html body.ccrm-app-document .ccrm-app-content :is(.wp-block-columns, .wp-block-column) {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Tüm eski/yeni modül kökleri aynı merkezi içerik genişliğini kullanır. */
html body.ccrm-app-document .ccrm-app-content :is(
    .ccrm-ui-page, .ccrm-page-system, .ccrm-layout-page,
    .ccrm-performance-page, .ccrm-workflow-page, .ccrm-prod-page,
    .ccrm-system-page, .ccrm-customer-page, .ccrm-users-page,
    .ccrm360-page, .ccrm-project-page, .ccrm-finance-page,
    .ccrm-help-page, .ccrm-stock-page, .ccrm-hr-page,
    .ccrm-doc-page, .ccrm-whatsapp-page, .ccrm-notifications-page,
    .ccrm-menu-management-page, .ccrm-suppliers-page, .ccrm-price-lists-page,
    .ccrm-ext-page, .ccrm-tax-page, .ccrm-plan-page,
    .ccrm-final-page, .ccrm-wrap, .ccrm-clean-wrap,
    .cordeocrm-forms-page, .cordeocrm-calls-page, .cordeocrm-sales-page,
    .cc-leads-page, .cc-people-page, .ccrm-feed-wrap,
    .ccrm-panel-shell, .cordeo-panel-shell, .ccrm-mc-page,
    .ccrm-ca-page, .ccrm-director-page, .ccrm-sh-page
) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 900px) {
    html body.ccrm-app-document .ccrm-app-frame {
        width: 100%;
        margin-left: 0;
        padding-bottom: 0;
    }
    html body.ccrm-app-document .ccrm-app-header__inner {
        width: calc(100% - 28px);
        padding: 0;
    }
    html body.ccrm-app-document .ccrm-app-header__logo-image { max-width: 142px; max-height: 36px; }
    html body.ccrm-app-document .ccrm-app-header__identity { display: none; }
    html body.ccrm-app-document .ccrm-app-header__links { gap: 14px; }
    html body.ccrm-app-document .ccrm-app-header__links a { font-size: 12px; }
    html body.ccrm-app-document .ccrm-app-content { width: calc(100% - 24px); padding: 22px 0 42px; }
}

/* CordeoCRM v24.8.47 — sade odak durumlu doğrudan hızlı arama */
html body.ccrm-app-document .ccrm-app-header__search-slot {
    position: relative;
    display: flex;
    min-width: 230px;
    max-width: 420px;
    flex: 1 1 420px;
    align-items: center;
    justify-content: center;
}

html body.ccrm-app-document .ccrm-global-search {
    position: relative;
    width: min(100%, 390px);
    min-width: 0;
}

html body.ccrm-app-document .ccrm-global-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

html body.ccrm-app-document .ccrm-global-search__field {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
    color: #64748b;
    box-shadow: none;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease;
}

html body.ccrm-app-document .ccrm-global-search__field:focus-within {
    border-color: #aab8c8;
    background: #fff;
    color: #2563eb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

html body.ccrm-app-document .ccrm-global-search__field input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #202a36;
    box-shadow: none;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    outline: 0 !important;
    -webkit-appearance: none;
    appearance: none;
}

html body.ccrm-app-document .ccrm-global-search__field input::placeholder {
    color: #8a94a3;
}

html body.ccrm-app-document .ccrm-global-search__field input::-webkit-search-decoration,
html body.ccrm-app-document .ccrm-global-search__field input::-webkit-search-cancel-button,
html body.ccrm-app-document .ccrm-global-search__field input::-webkit-search-results-button,
html body.ccrm-app-document .ccrm-global-search__field input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

html body.ccrm-app-document .ccrm-global-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    box-sizing: border-box;
    width: 100%;
    max-height: min(420px, calc(100vh - 110px));
    overflow: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    overscroll-behavior: contain;
}

html body.ccrm-app-document .ccrm-global-search__panel[hidden],
html body.ccrm-app-document .ccrm-global-search__empty[hidden] {
    display: none !important;
}

html body.ccrm-app-document .ccrm-global-search__summary {
    padding: 4px 7px 8px;
    color: #8a94a3;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
}

html body.ccrm-app-document .ccrm-global-search__results {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

html body.ccrm-app-document .ccrm-global-search__result {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    text-decoration: none;
    outline: 0;
}

html body.ccrm-app-document .ccrm-global-search__result:hover,
html body.ccrm-app-document .ccrm-global-search__result.is-active,
html body.ccrm-app-document .ccrm-global-search__result:focus-visible {
    border-color: #dbeafe;
    background: #f4f8ff;
    color: #1d4ed8;
    text-decoration: none;
}

html body.ccrm-app-document .ccrm-global-search__result-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5eaf0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
}

html body.ccrm-app-document .ccrm-global-search__result-icon svg {
    width: 14px;
    height: 14px;
}

html body.ccrm-app-document .ccrm-global-search__result.is-active .ccrm-global-search__result-icon,
html body.ccrm-app-document .ccrm-global-search__result:hover .ccrm-global-search__result-icon {
    border-color: #bfdbfe;
    color: #2563eb;
}

html body.ccrm-app-document .ccrm-global-search__result-copy {
    min-width: 0;
}

html body.ccrm-app-document .ccrm-global-search__result-copy strong,
html body.ccrm-app-document .ccrm-global-search__result-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body.ccrm-app-document .ccrm-global-search__result-copy strong {
    color: #263241;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

html body.ccrm-app-document .ccrm-global-search__result-copy span {
    margin-top: 2px;
    color: #8a94a3;
    font-size: 10px;
    font-weight: 400;
}

html body.ccrm-app-document .ccrm-global-search__result-arrow {
    color: #a3adba;
    font-size: 17px;
    line-height: 1;
}

html body.ccrm-app-document .ccrm-global-search__empty {
    display: flex;
    min-height: 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #98a2b3;
    text-align: center;
}

html body.ccrm-app-document .ccrm-global-search__empty strong {
    color: #475467;
    font-size: 12px;
    font-weight: 500;
}

html body.ccrm-app-document .ccrm-global-search__empty span {
    font-size: 10.5px;
}

@media (max-width: 900px) {
    html body.ccrm-app-document .ccrm-app-header {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    html body.ccrm-app-document .ccrm-app-header__inner {
        gap: 10px;
    }

    html body.ccrm-app-document .ccrm-app-header__search-slot {
        min-width: 120px;
        max-width: none;
        flex: 1 1 auto;
    }

    html body.ccrm-app-document .ccrm-global-search {
        width: 100%;
    }

    html body.ccrm-app-document .ccrm-global-search__field {
        padding-right: 10px;
    }

    html body.ccrm-app-document .ccrm-global-search__field input {
        font-size: 11.5px;
    }

    html body.ccrm-app-document .ccrm-global-search__panel {
        width: min(380px, calc(100vw - 24px));
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 560px) {
    html body.ccrm-app-document .ccrm-app-header__brand {
        max-width: 104px;
    }

    html body.ccrm-app-document .ccrm-app-header__logo-image {
        max-width: 104px;
    }

    html body.ccrm-app-document .ccrm-app-header__links a:first-child {
        display: none;
    }

    html body.ccrm-app-document .ccrm-app-header__links {
        gap: 8px;
    }

    html body.ccrm-app-document .ccrm-app-header__links a {
        font-size: 11px;
    }

    html body.ccrm-app-document .ccrm-global-search__field {
        min-height: 36px;
    }

    html body.ccrm-app-document .ccrm-global-search__field input {
        min-height: 32px;
    }
}

/* CordeoCRM v24.8.53 — sabit üst bant.
 * Logo, hızlı arama, firma/kullanıcı bilgileri ve hesap bağlantıları sayfa
 * kaydırmasından bağımsız olarak ekranın üstünde kalır. Sol menü genişliği
 * değiştiğinde üst bant aynı merkezi genişlik değişkenini izler. */
html:has(body.ccrm-app-document) {
    scroll-padding-top: calc(var(--ccrm-app-header-height) + 12px);
}

html body.ccrm-app-document .ccrm-app-header {
    position: fixed !important;
    inset: 0 0 auto 0;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding-left: var(--ccrm-menu-width) !important;
    overflow: visible;
    box-sizing: border-box;
}

html body.ccrm-app-document .ccrm-app-header__inner {
    overflow: visible;
}

/* Sabit üst bant normal belge akışından çıktığı için içerik aynı yükseklik
 * kadar aşağı alınır; böylece sayfa başlığı bant altında kalmaz. */
html body.ccrm-app-document .ccrm-app-main {
    padding-top: var(--ccrm-app-header-height);
}

@media (max-width: 900px) {
    html body.ccrm-app-document .ccrm-app-header {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Mobil alt menü sabitken son içerik satırlarının menü altında kalmasını
     * engeller; güvenli alanı olan telefonlarda ek alt boşluğu da kapsar. */
    html body.ccrm-app-document .ccrm-app-content {
        padding-bottom: calc(42px + 82px + env(safe-area-inset-bottom, 0px));
    }
}

/* CordeoCRM v24.8.54 — paket bilgisi sabit üst bantta firma adının altında. */
html body.ccrm-app-document .ccrm-app-header__company-stack {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

html body.ccrm-app-document .ccrm-app-header__package {
    display: inline-flex;
    max-width: 250px;
    overflow: hidden;
    color: #7c8a9c;
    font-size: 9.5px;
    font-weight: 400;
    line-height: 1.15;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body.ccrm-app-document .ccrm-app-header__package:hover,
html body.ccrm-app-document .ccrm-app-header__package:focus-visible {
    color: var(--ccrm-primary, #2563eb);
    outline: 0;
    text-decoration: none;
}

html body.ccrm-app-document .ccrm-app-header__identity {
    align-items: center;
}

@media (max-width: 900px) {
    /* Mobilde firma/kullanıcı satırı yerine yalnız paket bilgisi gösterilir;
     * böylece sabit üst bant kalabalıklaşmadan paket bilgisi korunur. */
    html body.ccrm-app-document .ccrm-app-header__identity {
        display: flex !important;
    }

    html body.ccrm-app-document .ccrm-app-header__company-stack {
        align-items: flex-end;
    }

    html body.ccrm-app-document .ccrm-app-header__company,
    html body.ccrm-app-document .ccrm-app-header__separator,
    html body.ccrm-app-document .ccrm-app-header__user,
    html body.ccrm-app-document .ccrm-app-header__role {
        display: none !important;
    }

    html body.ccrm-app-document .ccrm-app-header__package {
        max-width: 92px;
        font-size: 8.5px;
    }
}
