﻿/* ERP AI Asistani - Tam ekran arayuz. Eski assistant.css yerine gecer. */

#erp-assistant {
    --assistant-navy: #123143;
    --assistant-navy-dark: #0e2634;
    --assistant-teal: #1496a7;
    --assistant-teal-dark: #0d7585;
    --assistant-ink: #172b39;
    --assistant-muted: #657889;
    --assistant-border: #dce5eb;
    --assistant-page: #f4f7fa;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--assistant-ink);
    font-size: 14px;
}

    #erp-assistant,
    #erp-assistant * {
        box-sizing: border-box;
    }

        #erp-assistant button,
        #erp-assistant textarea {
            font-family: inherit;
        }

        #erp-assistant button {
            cursor: pointer;
        }

        /* ERP acikken sag alttaki kucuk giris butonu. */
        #erp-assistant .assistant-launcher {
            position: fixed;
            right: 25px;
            bottom: 24px;
            z-index: 9998;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 13px 20px;
            border: 0;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--assistant-teal), #107a9f);
            color: #fff;
            box-shadow: 0 11px 28px rgba(14, 71, 93, .26);
            font-size: 14px;
            font-weight: 700;
            transition: transform .15s ease, box-shadow .15s ease;
        }

            #erp-assistant .assistant-launcher:hover {
                transform: translateY(-2px);
                box-shadow: 0 14px 32px rgba(14, 71, 93, .32);
            }

            #erp-assistant .assistant-launcher[hidden] {
                display: none !important;
            }

        #erp-assistant .assistant-launcher-symbol {
            font-size: 22px;
            line-height: 1;
        }

        /* Tam ekran panel, diger sayfa ogelerinin uzerinde gorunur. */
        #erp-assistant .assistant-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            width: 100%;
            height: 100vh;
            height: 100dvh;
            background: #fff;
            color: var(--assistant-ink);
        }

            #erp-assistant .assistant-overlay[hidden] {
                display: none !important;
            }

body.erp-assistant-open {
    overflow: hidden !important;
}

/* Ust baslik */
#erp-assistant .assistant-topbar {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 78px;
    padding: 12px 26px;
    background: var(--assistant-navy);
    color: #fff;
    box-shadow: 0 3px 14px rgba(12, 36, 51, .1);
}

#erp-assistant .assistant-brand,
#erp-assistant .assistant-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

#erp-assistant .assistant-brand-icon,
#erp-assistant .assistant-welcome-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 47px;
    height: 47px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    color: #6ce1e9;
    font-size: 27px;
}

#erp-assistant .assistant-brand h1 {
    margin: 0;
    color: #fff;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
}

#erp-assistant .assistant-brand p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #c7d8e1;
}

#erp-assistant .assistant-readonly-note {
    color: #bdd3dc;
    font-size: 12px;
}

#erp-assistant .assistant-header-new {
    display: none;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 9px;
    background: rgba(255,255,255,.09);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

#erp-assistant .assistant-close {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    color: white;
    font-size: 28px;
    line-height: 1;
}

    #erp-assistant .assistant-close:hover {
        background: rgba(255, 255, 255, .19);
    }

/* Sol menu ve sohbet alani */
#erp-assistant .assistant-workspace {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#erp-assistant .assistant-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 28px 18px;
    border-right: 1px solid var(--assistant-border);
    background: #f7f9fb;
    overflow-y: auto;
}

#erp-assistant .assistant-sidebar-title {
    padding: 0 12px;
    margin-bottom: 14px;
    color: #253e4d;
    font-size: 15px;
    font-weight: 700;
}

#erp-assistant .assistant-new-chat {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #c1d6e1;
    border-radius: 11px;
    background: white;
    color: #155f74;
    text-align: left;
    font-weight: 700;
}

    #erp-assistant .assistant-new-chat:hover {
        border-color: var(--assistant-teal);
        background: #edf9fa;
    }

#erp-assistant .assistant-prompt-label {
    margin: 30px 11px 12px;
    color: #718797;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

#erp-assistant .assistant-prompts {
    display: grid;
    gap: 7px;
}

#erp-assistant .assistant-prompt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #385161;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
}

    #erp-assistant .assistant-prompt:hover,
    #erp-assistant .assistant-prompt:focus-visible {
        background: #e7f2f5;
        color: #0d7482;
    }

    #erp-assistant .assistant-prompt span {
        color: #2c9bac;
        font-size: 16px;
    }

#erp-assistant .assistant-sidebar-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 22px 10px 0;
    color: #758995;
    font-size: 11px;
}

#erp-assistant .assistant-sidebar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1eab90;
}

#erp-assistant .assistant-chat {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    background: #fff;
}

#erp-assistant .assistant-chat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 70px;
    padding: 13px 32px;
    border-bottom: 1px solid #e9eef2;
}

    #erp-assistant .assistant-chat-heading strong,
    #erp-assistant .assistant-chat-heading span {
        display: block;
    }

    #erp-assistant .assistant-chat-heading strong {
        color: #1a3444;
        font-size: 16px;
    }

    #erp-assistant .assistant-chat-heading span {
        margin-top: 4px;
        color: #7b8d9a;
        font-size: 12px;
    }

    #erp-assistant .assistant-chat-heading .assistant-chat-tag {
        padding: 7px 12px;
        border-radius: 999px;
        background: #e8f8f8;
        color: #107f8d;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

/* Kaydirilabilir mesaj alani */
#erp-assistant .assistant-messages {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 25px 32px 35px;
    background: var(--assistant-page);
}

#erp-assistant .assistant-welcome {
    max-width: 740px;
    margin: 60px auto 0;
    text-align: center;
    color: #253e4e;
}

    #erp-assistant .assistant-welcome[hidden] {
        display: none;
    }

#erp-assistant .assistant-welcome-icon {
    margin: 0 auto 22px;
    width: 60px;
    height: 60px;
    background: #d8f0f4;
    color: #1393a2;
    border-radius: 20px;
    font-size: 32px;
}

#erp-assistant .assistant-welcome h2 {
    margin: 0 0 12px;
    color: #203c4c;
    font-size: clamp(22px, 2.3vw, 29px);
    font-weight: 750;
}

#erp-assistant .assistant-welcome p {
    margin: 0 auto;
    max-width: 550px;
    color: #617785;
    font-size: 14px;
    line-height: 1.7;
}

#erp-assistant .assistant-welcome .assistant-welcome-tip {
    margin-top: 19px;
    padding: 12px 15px;
    border: 1px solid #d9e8ec;
    border-radius: 12px;
    background: white;
    color: #457584;
    font-size: 13px;
}

/* Sohbet balonlari */
#erp-assistant .assistant-message {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 23px;
}

#erp-assistant .assistant-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    border-radius: 11px;
    color: white;
    background: var(--assistant-teal);
    font-size: 18px;
    font-weight: 700;
}

#erp-assistant .assistant-message.assistant-user {
    flex-direction: row-reverse;
}

#erp-assistant .assistant-user .assistant-avatar {
    background: #6c8191;
    font-size: 12px;
}

#erp-assistant .assistant-bubble {
    min-width: 0;
    max-width: calc(100% - 46px);
    padding: 16px 19px;
    border: 1px solid #e2eaf0;
    border-radius: 15px;
    background: white;
    color: #152b3a;
    font-size: 14px;
    line-height: 1.65;
    box-shadow: 0 2px 9px rgba(24, 53, 74, .045);
}

#erp-assistant .assistant-bot .assistant-bubble {
    width: fit-content;
}

#erp-assistant .assistant-user .assistant-bubble {
    max-width: min(75%, 800px);
    border-color: #cce5eb;
    background: #e1f3f6;
    color: #164153;
    white-space: pre-wrap;
}

#erp-assistant .assistant-bubble-content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

    /* Markdown: paragraflar, listeler ve baglantilar */
    #erp-assistant .assistant-bubble-content p {
        margin: 0 0 10px;
    }

        #erp-assistant .assistant-bubble-content p:last-child {
            margin-bottom: 0;
        }

    #erp-assistant .assistant-bubble-content strong {
        color: #172c3b;
        font-weight: 700;
    }

    #erp-assistant .assistant-bubble-content h1,
    #erp-assistant .assistant-bubble-content h2,
    #erp-assistant .assistant-bubble-content h3 {
        margin: 14px 0 8px;
        color: #1d4155;
        font-size: 17px;
        line-height: 1.35;
    }

    #erp-assistant .assistant-bubble-content ul,
    #erp-assistant .assistant-bubble-content ol {
        margin: 8px 0 12px;
        padding-left: 24px;
    }

    #erp-assistant .assistant-bubble-content li {
        margin: 5px 0;
    }

    #erp-assistant .assistant-bubble-content a {
        color: #087f9a;
        text-decoration: underline;
    }

/* Genis Markdown tablolarinda yatay kaydirma. */
#erp-assistant .assistant-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 13px 0;
    border: 1px solid #dce6ec;
    border-radius: 10px;
    background: white;
}

#erp-assistant .assistant-bubble:has(.assistant-table-scroll) {
    width: 100%;
}

#erp-assistant .assistant-bubble-content table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    color: #1e3343;
    font-size: 13px;
}

#erp-assistant .assistant-bubble-content th,
#erp-assistant .assistant-bubble-content td {
    padding: 11px 13px;
    border-right: 1px solid #e4edf2;
    border-bottom: 1px solid #e4edf2;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

#erp-assistant .assistant-bubble-content th {
    background: #e5f4f6;
    color: #1a5365;
    font-weight: 700;
}

#erp-assistant .assistant-bubble-content tr:nth-child(even) td {
    background: #f7fafb;
}

#erp-assistant .assistant-bubble-content tr:hover td {
    background: #edf7fa;
}

#erp-assistant .assistant-bubble-content pre {
    max-width: 100%;
    margin: 12px 0;
    padding: 12px;
    overflow-x: auto;
    border-radius: 10px;
    background: #eaf0f4;
    white-space: pre;
}

#erp-assistant .assistant-bubble-content code {
    font-family: Consolas, monospace;
    font-size: 12px;
}

#erp-assistant .assistant-bubble-content blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--assistant-teal);
    background: #eff9fa;
}

#erp-assistant .assistant-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding: 5px 9px;
    border: 1px solid #d9e5ea;
    border-radius: 7px;
    background: #f9fbfc;
    color: #59717f;
    font-size: 11px;
}

    #erp-assistant .assistant-copy:hover {
        border-color: #94c4cd;
        color: #147d8b;
    }

#erp-assistant .assistant-typing {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #537383;
}

#erp-assistant .assistant-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #c5e4e9;
    border-top-color: var(--assistant-teal);
    border-radius: 50%;
    animation: assistant-spin .75s linear infinite;
}

@keyframes assistant-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ekranin altinda sabit mesaj formu */
#erp-assistant .assistant-composer {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 16px clamp(16px, 4vw, 50px) 18px;
    border-top: 1px solid #e3eaf0;
    background: #fff;
}

#erp-assistant .assistant-input-label {
    display: block;
    max-width: 1200px;
    margin: 0 auto 8px;
    color: #365465;
    font-size: 12px;
    font-weight: 700;
}

#erp-assistant .assistant-composer-box {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 1200px;
    margin: auto;
    padding: 8px;
    border: 1px solid #cadae4;
    border-radius: 13px;
    background: white;
    transition: border-color .15s, box-shadow .15s;
}

    #erp-assistant .assistant-composer-box:focus-within {
        border-color: var(--assistant-teal);
        box-shadow: 0 0 0 3px rgba(20, 150, 167, .12);
    }

#erp-assistant #assistant-question {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    max-height: 140px;
    padding: 10px 12px;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: #203a49;
    font-size: 14px;
    line-height: 1.5;
}

    #erp-assistant #assistant-question::placeholder {
        color: #8598a5;
    }

#erp-assistant .assistant-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 47px;
    padding: 0 19px;
    border: 0;
    border-radius: 10px;
    background: var(--assistant-teal);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

    #erp-assistant .assistant-send:hover:not(:disabled) {
        background: var(--assistant-teal-dark);
    }

    #erp-assistant .assistant-send:disabled {
        cursor: wait;
        opacity: .62;
    }

#erp-assistant .assistant-composer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    margin: 7px auto 0;
    color: #8797a3;
    font-size: 11px;
}

#erp-assistant button:focus-visible,
#erp-assistant textarea:focus-visible {
    outline: 3px solid rgba(31, 170, 184, .4);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    #erp-assistant .assistant-workspace {
        grid-template-columns: 225px minmax(0, 1fr);
    }

    #erp-assistant .assistant-sidebar {
        padding: 22px 12px;
    }

    #erp-assistant .assistant-messages {
        padding: 22px 17px;
    }

    #erp-assistant .assistant-chat-heading {
        padding: 12px 19px;
    }
}

@media (max-width: 680px) {
    #erp-assistant .assistant-sidebar {
        display: none;
    }

    #erp-assistant .assistant-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    #erp-assistant .assistant-topbar {
        min-height: 65px;
        padding: 10px 14px;
    }

    #erp-assistant .assistant-brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    #erp-assistant .assistant-brand h1 {
        font-size: 16px;
    }

    #erp-assistant .assistant-brand p {
        font-size: 11px;
    }

    #erp-assistant .assistant-header-new {
        display: inline-flex;
    }

    #erp-assistant .assistant-readonly-note,
    #erp-assistant .assistant-chat-heading .assistant-chat-tag {
        display: none;
    }

    #erp-assistant .assistant-chat-heading {
        min-height: 58px;
    }

    #erp-assistant .assistant-messages {
        padding: 18px 12px;
    }

    #erp-assistant .assistant-message {
        gap: 7px;
        margin-bottom: 17px;
    }

    #erp-assistant .assistant-avatar {
        flex-basis: 29px;
        width: 29px;
        height: 29px;
    }

    #erp-assistant .assistant-bubble {
        max-width: calc(100% - 36px);
        padding: 12px;
    }

    #erp-assistant .assistant-user .assistant-bubble {
        max-width: calc(100% - 36px);
    }

    #erp-assistant .assistant-composer {
        padding: 12px;
    }

    #erp-assistant .assistant-composer-bottom span:first-child {
        display: none;
    }

    #erp-assistant .assistant-welcome {
        margin-top: 33px;
    }
}

@media (max-width: 390px) {
    #erp-assistant .assistant-launcher {
        right: 12px;
        bottom: 12px;
    }

    #erp-assistant .assistant-send {
        padding: 0 11px;
    }

        #erp-assistant .assistant-send span:first-child {
            display: none;
        }
}

@media (prefers-reduced-motion: reduce) {
    #erp-assistant *, #erp-assistant *::before, #erp-assistant *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
/* ========================================
   ERP AI ASISTANI - SESLI SOHBET
   ======================================== */


/* Sesli sohbet butonlarinin bulundugu alan */

#erp-assistant .assistant-voice-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}


    /* Sesli sohbet butonlarinin ortak tasarimi */

    #erp-assistant .assistant-voice-toolbar button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 16px;
        border: 1px solid transparent;
        border-radius: 10px;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }


/* Sesli sohbet baslat butonu */

#erp-assistant .assistant-voice-start {
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.2);
}

    #erp-assistant .assistant-voice-start:hover {
        background: #115e59;
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(15, 118, 110, 0.3);
    }

    #erp-assistant .assistant-voice-start:active {
        transform: translateY(0);
    }


/* Mikrofonu kapat / ac butonu */

#erp-assistant .assistant-voice-mute {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

    #erp-assistant .assistant-voice-mute:hover {
        background: #bae6fd;
    }


/* Gorusmeyi bitir butonu */

#erp-assistant .assistant-voice-stop {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

    #erp-assistant .assistant-voice-stop:hover {
        background: #fecaca;
    }


/* Gizli butonlar kesinlikle gorunmesin */

#erp-assistant .assistant-voice-toolbar button[hidden] {
    display: none !important;
}


/* Klavye ile buton secimi */

#erp-assistant .assistant-voice-toolbar button:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 3px;
}


/* Devre disi buton */

#erp-assistant .assistant-voice-toolbar button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* ========================================
   SESLI SOHBET DURUM GOSTERGESI
   ======================================== */

#erp-assistant .assistant-voice-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 10px 25px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
}


/* Durum gostergesi noktasi */

#erp-assistant .assistant-voice-indicator-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
    background: #0f766e;
}


/* Sesli sohbet durum yazisi */

#erp-assistant #assistant-voice-status {
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}


/* ========================================
   MOBIL UYUMLULUK
   ======================================== */

@media (max-width: 768px) {

    #erp-assistant .assistant-chat-heading {
        flex-wrap: wrap;
        gap: 12px;
    }

    #erp-assistant .assistant-voice-toolbar {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

        #erp-assistant .assistant-voice-toolbar button {
            padding: 9px 12px;
            font-size: 12px;
        }

    #erp-assistant .assistant-voice-indicator {
        padding: 8px 15px;
        font-size: 12px;
    }

    #erp-assistant #assistant-voice-status {
        font-size: 12px;
    }
}


/* Kucuk telefon ekranlari */

@media (max-width: 480px) {

    #erp-assistant .assistant-voice-toolbar {
        flex-direction: row;
        align-items: center;
    }

        #erp-assistant .assistant-voice-toolbar button {
            flex: 1 1 auto;
            padding: 10px;
            font-size: 12px;
        }
}