:root {
    --primary: #4E008C;
    --secondary: #D4B3FF;
    --danger: #e74c3c;
    --text-main: #222;
    --bg-main: #fff;
}

/* Ogólne tło i typografia */
body {
    background-color: #111;
    color: #f0f0f0;
    font-family: 'Lato', sans-serif;
    padding: 20px;
    margin: 0;
}

/* Nagłówki */
h1,
h2,
h3 {
    color: darkgrey;
    margin-bottom: 20px;
    font-weight: 300;
    text-transform: uppercase;


}

h1 {
    font-size: 20px;
}

/* Linki i przyciski */
a,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 4px 4px;
    margin: 5px 0;
    font-size: 12px;
    min-width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    gap: 6px;
}

a:hover,
.button:hover,
button:hover {
    background-color: #aa4400;
}

/* Tabele */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

th,
td {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #333;

    color: #ddd;
}

th {
    background-color: #222;
    color: #eee;
}

td a,
td form button,
td form input {
    max-width: 80px;
    width: 40%;
    padding: 2px;
    margin: 2px;
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
    max-height: 20px;
}

td:last-child,
th:last-child {
    width: 172px;
    overflow: hidden;
    text-overflow: ellipsis;

}

.sort-arrow {
    background: none;
    margin: 0;
    padding: 0 6px;
    display: inline;
}



/* Formularze */
input[type="text"],
input[type="file"],
textarea {
    background-color: #222;
    border: 1px solid #444;
    color: #f0f0f0;
    padding: 8px;
    width: 100%;
    margin-bottom: 12px;
    border-radius: 4px;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #00aaff;
}

/* Powiadomienia */
.success-message {
    background-color: #2a8f2a;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.user-info {
    font-size: 12px;
    ;
}

/* Obrazki */
img {
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

/* ... poprzednie style zostają ... */

/* Nowe: styl przycisków z ikonami */

.content-2columns {
    display: flex;
    justify-content: space-between;
}

.button svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.button-schema {
    width: 50%;
}


/* Pola formularza — zmniejszone */
input[type="text"],
input[type="file"],
textarea {
    background-color: #222;
    border: 1px solid #444;
    color: #f0f0f0;
    padding: 6px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
}

/* Mniejsze odstępy między wierszami w formularzu */
form label {
    margin-bottom: 4px;
    display: block;
    font-size: 14px;
}

.toolbar {
    position: fixed;
    box-sizing: border-box;
    top: 0;
    right: 0;
    max-height: 50px;
    width: calc(100vw - 200px);
    background-color: #1a1a1a;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    border-bottom: 1px solid #333;
    z-index: 999;
}

.toolbar .search-form {
    display: flex;
    gap: 4px;
    min-width: 400px;
    width: 100%;
}

.toolbar input[type="text"] {
    padding: 6px;
    background-color: #222;
    border: 1px solid #444;
    color: #f0f0f0;
    border-radius: 4px;
    margin: 0;
}

.toolbar button,
.toolbar a {
    min-width: 100px;
}

.toolbar button:hover {
    background-color: #aa4400;
}

.zobacz-event {
    width: 200px;
    min-width: 200px;
}

#eventSelect {
    height: 23px;
    font-size: 12px;
    padding: 0 20px;
    min-width: 400px;

    background: lightgrey;
}



/* Dostosuj padding strony głównej, żeby treść nie wchodziła pod paski */


.navbar {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    box-sizing: border-box;
    background-color: #111;
    padding: 10px 20px;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    color: white;
    border-bottom: 1px solid #333;
}

tr.przypisany {
    background-color: #000;

}

.content {
    display: flex;
    box-sizing: border-box;
    flex-direction: column;
    position: absolute;
    padding: 20px;
    top: 0;
    right: 0;
    width: calc(100vw - 230px);
}


.logo {
    width: 140px;
    position: absolute;
    margin: 10px;
}

.left {
    margin-top: 70px;
}

.center {
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: flex-end;
    width: calc(100% - 200px);
    box-sizing: border-box;
}

.form-edycja {
    display: flex;
    flex-direction: column;
    width: 60vw;
    margin: 0 auto;
    justify-content: flex-start;
}

.home .main-content {
    right: calc(100vw - 80%);
    width: 550px;
    justify-content: center;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
}

.button-wyloguj {
    width: 200px;
}

.register-form {
    width: 400px;
}

.register-form input {
    width: 400px;
    box-sizing: border-box;
}

.table-center {
    text-align: center;
}

.table-extras td input {
    border: none;
    background: none;
    margin: 0;
    color: #fff;
}

.table-extras td:first-of-type,
.extra-usun,
.extra-usun button {
    width: 50px !important;

}

.extras-zapisz {
    width: 200px;
    min-width: 200px;
    height: 50px;

}

.table-50 {
    width: 50px !important;
    text-align: center;
}

.delete-button {
    min-width: 100%;
    box-sizing: content-box;
}

.chat-container {
    max-width: 70%;
    margin: 0 auto;
}

.chat-history {
    display: flex;
    flex-direction: column;
    color: #000;

    height: 420px;
    background: #fff;
    overflow: auto;
}

.chat-input {
    display: flex;
    width: 100%;
    margin: 0;
}

#chat-input {
    margin: 0;
}

.chat-box {
    display: flex;
    flex-direction: row;
    max-width: 100%;
    margin-bottom: 20px;
}

#chat-send {
    width: 100px;
    min-width: 100px;
    height: 40px;
    margin: 0 0 0 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
}

#chat-history {
    border-radius: 5px;
}

.menu-ramka {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px dotted #fff;
}

.chatbot-header {
    font-size: 12px;
    line-height: 1.7;
}

.chat-history-message {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 5px;
    background: var(--primary);
    color: #fff
}

.chatbot-response {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 5px;
    background: darkgray;
}

.content-width {
    max-width: 70%;
    margin: 0 auto;
}




.zaloguj {
    width: 340px;
    height: 50px;
    min-width: unset;
}

.modal-log1 {
    display: none;
}

/* Ukryj modal, jeśli nie ma klasy .show (Bootstrap sam dodaje .show przy otwieraniu) */
.modal:not(.show) {
    display: none !important;
}

.menu-ramka form {
    margin: 0;

}

.menu-ramka form label {
    display: inline;
    font-size: 12px;
    max-width: 50%;
    margin: 5px 12px 5px 0;
}

.modal-log {
    width: 100%;
    position: absolute;
    top: 0;
    height: 100vh;
    background: #000;
    overflow-y: auto;
    font-size: 12px;

}

#promofeedLogModal p {
    margin: 2px 0;
}

.bg-danger {
    color: #ef4444;
    font-weight: 600;
}

.btn-danger {
    background: #8C1B04;

}

.tabela-scrapping form,
.tabela-scrapping button {
    min-width: unset;
    max-width: unset;
    width: 30%;
    margin: 5px 0;
    height: 20px;
    padding: 2px;
}

.chatbot-response>b {
    color: var(--primary);
}

/* ============================================================
   CHATBOT DEMO - Unified Desktop & Mobile View
   ============================================================ */

/* Global CSS variables for safe areas and layout */
:root {
    --safe-top: max(env(safe-area-inset-top), 0px);
    --safe-bottom: max(env(safe-area-inset-bottom), 12px);
    --composer-h: 60px;
    --bottom-bar-h: var(--composer-h);
}

/* Logo gościa - responsywny */
.logo-guest {
    width: 140px;
    margin: 20px auto 12px;
}

/* Pełnoekranowy kontener czata (Desktop & Mobile) */
.content-demochatbot {
    display: flex;
    flex-direction: column;
    height: 90dvh;
    max-height: 100dvh;
    padding: 0 12px 0px 12px;
    box-sizing: border-box;
    min-height: 0;
    overflow: hidden;
}

/* Kolumna: nagłówek + historia */
.content-demochatbot .chat-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    width: 100%;
    margin: 50px auto 0 auto;
    gap: 8px;
    padding-bottom: 0;
}

/* Sticky nagłówek */
.content-demochatbot .chat-container>h1 {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -12px 8px;
    padding: 10px 12px;
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 16px;
    line-height: 1.2;
}

/* Historia czatu - JEDYNY pionowy scroll */
.content-demochatbot .chat-history,
.content-demochatbot #chat-history {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    background: #111;
    color: #f0f0f0;
    padding: 72px 8px calc(var(--bottom-bar-h) + var(--safe-bottom) + 12px);
    margin: 0;
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.content-demochatbot .chat-history::-webkit-scrollbar {
    width: 6px;
}

.content-demochatbot .chat-history::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

/* Bąbelki wiadomości */
.content-demochatbot .chat-history-message,
.content-demochatbot .chatbot-response {
    max-width: 100%;
    border-radius: 18px;
    padding: 10px 12px;
    line-height: 1.45;
    word-wrap: break-word;
    word-break: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.16);
    font-size: 15px;
}

.content-demochatbot .chat-history-message {
    background: var(--primary);
    color: #fff;
    border-top-right-radius: 6px;
}

.content-demochatbot .chatbot-response {
    background: #222;
    color: #f5f5f5;
    border-top-left-radius: 6px;
}

/* Composer (pole input + przycisk) przyklejony do dołu */
.content-demochatbot .chat-box {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: saturate(150%) blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.content-demochatbot #chat-input {
    flex: 1 1 auto;
    height: 44px;
    font-size: 16px;
    padding: 10px 12px;
    margin: 0;
    border-radius: 5px;
    border: 1px solid #2a2a2a;
    background: #1a1a1a;
    color: #f0f0f0;
    outline: none;
}

.content-demochatbot #chat-input::placeholder {
    color: #9aa0a6;
}

.content-demochatbot #chat-input:focus {
    border-color: #3a3a3a;
}

.content-demochatbot #chat-send {
    height: 44px;
    min-width: 44px;
    width: auto;
    padding: 0 14px;
    margin: 0;
    border-radius: 5px;
    font-size: 14px;
    background: var(--primary);
    color: #fff;
}

.content-demochatbot #chat-send:disabled {
    opacity: .6;
    cursor: not-allowed;
}


/* Pasek podpowiedzi — jeśli występuje, „przyklejony” nad krawędzią */
#chat-suggestions-container {
    height: 0;
   
}

.content-demochatbot .chat-container #chat-suggestions-container>* {
    flex: 0 0 auto;
}

.is-fullscreen #chat-suggestions-container {
    padding: 50px 10px 0;
    box-sizing: border-box;
    height: 100vh;
    width: 100%;
    position: fixed;
    display: flex;
    max-width: 100%;
    top: 0;
    left: 0;
    background: var(--text-main);
    z-index: 15;
}

.is-fullscreen #suggestions-fullscreen-toggle {
    display: inline-flex;
    z-index: 10;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 20px;
    font-size: 18px;
    padding: 5px 19px;
    min-width: unset;
    z-index: 20;
    background: var(--primary);
}

.is-fullscreen #chat-suggestions-container ul {
    list-style: none;

    padding: 0;
    width: 80%;
    margin: 0 auto;
}

.is-fullscreen #chat-suggestions-container ul a {

    padding: 20px;
}

#homeprofit-return,
#reset-chat,
#suggestions-fullscreen-toggle {
    position: fixed;
    top: 0;
    min-width: unset;
    padding: 15px;
    font-size: 16px;
    z-index: 12;
}

#homeprofit-return {
    right: 12px;
    top: 5px;
    padding: 10px 13px;
}

#reset-chat {
    right: 61px;
    top: 10px;
    font-size: 1.7rem;
    padding: 0px 6px 4px 4px;
    margin: 0;
}

#suggestions-fullscreen-toggle {
    right: 108px;
    top: 4px;
    padding: 11px 15px;
}



.content-demochatbot .chat-container-header {
    position: fixed;
    display: flex;
    right: 0;
    height: 60px;
    top: 0;
    background: rgba(17, 17, 17, 0.9);
    width: 100%;
}

.logo-chatbot {
    margin-left: 30px;
    width: 30%;
    max-width: 200px;
}

/* Preloader nad dolnym „barem” (composer/suggestions) */
.content-demochatbot #chat-preloader {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: calc(var(--safe-bottom) + var(--bottom-bar-h) + 8px);
    margin: 0 auto;
    padding: 6px 12px;
    text-align: center;
    z-index: 8;
    background: transparent;
    pointer-events: none;
}

/* Minimalny scrollbar */
.content-demochatbot .chat-history::-webkit-scrollbar {
    width: 6px;
}

.content-demochatbot .chat-history::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

/* Drobne korekty */
.content-demochatbot .content-width,
.content-demochatbot .chat-container {
    padding-bottom: 0 !important;
}



/* ============================================================
   Suggestion Metadata Styling (Score, Similarity, etc.)
   ============================================================ */

/* Container dla metadanych sugestii */
.suggestion-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

/* ID sugestii */
.suggestion-id {
    font-weight: 600;
}

/* Container dla score/similarity */
.suggestion-score {
    opacity: 0.8;
}

/* Similarity score */
.score-similarity {
    color: inherit;
}

/* Keyword boost */
.score-boost {
    color: #00ff88;
    font-weight: 600;
}

/* Klasy do ukrywania elementów metadanych */
.hide-suggestion-meta .suggestion-meta {
    display: none;
}

#chat-suggestions-container .suggestion-id {
    display: none;
}

#chat-suggestions-container .suggestion-score {}

#chat-suggestions-container .score-similarity {}

.hide-score-boost .score-boost {}

#chat-suggestions-container .suggestion-header {
    display: none;
}

#chat-suggestions-container .tooltip {
    display: none !important;
}

.logi-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}

.logi-filters {
    display: flex;
    justify-content: space-between;
}

.logi-stats>* {
    border: 1px dotted #fff;
    padding: 0 15px;
}

.logi-stats h3,
.logi-stats h6 {
    font-size: 14px;
    margin: 0;
    text-align: center;
}

.logi-stats .card-body {
    display: flex;
     flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: 83px;
}



.kolumny {
    display: flex;
    justify-content: space-between;
    margin-bottom: 100px;
}