#do-agent-hub {
  display: grid;
  grid-template-columns: 58% 38%;
  justify-content: center;      /* center grid on page */
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  font-size: 0.9rem;
}

#user-registration {
    background-color: #ffffff00!important;
}

/*Markup formatting*/
.doh-bubble ul { margin: .5rem 0 .5rem 1.25rem; padding: 0; }
.doh-bubble li { margin: .2rem 0; }
.doh-bubble pre { margin:.5rem 0; padding:.5rem .75rem; border-radius:.5rem; overflow:auto; }
.doh-bubble code { padding:.1rem .25rem; border-radius:.25rem; }
.doh-bubble { white-space: normal; } /* we’re inserting <br> ourselves */


/* Chat bubbles */
.chat-log { list-style: none; margin: 0; padding: 0; }
.chat-bubble { max-width: 72ch; line-height: 1.45; padding: .9rem 1.1rem; border-radius: 16px; margin: .5rem 0; }
.chat-bubble.twiza { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.chat-bubble.me    { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); margin-left: auto; }

/* Typing dots */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0;
}

.typing span {
  width: 0.5em;
  height: 0.5em;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0.3;
  animation: twizaTyping 1.2s infinite ease-in-out;
}
.typing span:nth-child(1) { animation-delay: 0s; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes twizaTyping {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}


.doh-card,
.doh-side,
.doh-chat-wrapper {
    background: linear-gradient(90deg, rgba(244, 244, 244, 0.1), rgba(124, 2, 63, 0.1));
    border: 2px solid rgba(212, 0, 106, 0.2);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    backdrop-filter: blur(10px);
}

.doh-settings .save-reset-bt,
.doh-card.kb .kb-card-btn {
    justify-content: flex-end;
}
.doh-settings{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.doh-settings .doh-field {
margin-top: -25px;
}

.doh-card.kb > .doh-title {
    margin-bottom: 20px;
}
.doh-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* optional */
}

.doh-side-footer {
    margin-top: auto;
    /* pushes footer to bottom */
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    padding-bottom: 22px;
}

.doh-side-footer .doh-title {
    margin-top: 2em;
}

.doh-side .doh-side-danger {
    /* optional: make it full width or keep default */
    /* width: 100%; */
}

.intro-card {
    margin-bottom: 16px;
    grid-column: 1 / -1;
}

.intro-card .doh-title {
    margin-bottom: 4px;
}

.doh-chat-input .doh-card.doh-input {
    border-radius: 10px;
    padding: 12px;
    border: 2px solid rgba(212, 0, 106, 0.2);
}

.doh-chat-wrapper .doh-chat-input {
    display: flex !important;
    flex-direction: column-reverse !important;
}

.doh-chat-wrapper,
.doh-log-wrapper,
.doh-log {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.doh-chat-input .doh-row {
    margin-top: -5px;
}


/* ensure main (chat) is left and sidebar (settings) is right */
.doh-main {
  grid-column: 1;
}

.doh-side {
  grid-column: 2;
}


#do-agent-hub>.doh-card {
    grid-column: 1 / -1;
}

.doh-title {
    font-weight: 700;
    margin-bottom: 8px;
    width: 100%;
    color: #d5016b;
    font-size: 1.5rem;
}

.doh-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 0;
}

.doh-help {
    margin-top: 8px;
}

.doh-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px dashed #eee;
}

.doh-input.fill_inited {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border: 1px solid #d30f63;
    border-radius: 8px;
}

.doh-input.small {
    width: 90px;
    min-width: 90px;
}

.doh-spawn {
    grid-column: 1 / -1;
    gap: 16px;
    display: flex;
    flex-direction: column;
}

.doh-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb4f;
    border-radius: 8px;
    resize: vertical;
}

.doh-input.fill_inited,
.doh-textarea.fill_inited {
    background: linear-gradient(90deg, rgba(244, 244, 244, 0.1), rgba(124, 2, 63, 0.1));
    border: 1px solid #d30f63;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.doh-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doh-modal-actions .doh-btn {
    margin-top: 20px;
    font-size: 0.8em;
}

.doh-btn {
    padding: 8px 30px;
    border: 1px solid #111827;
    background-color: #d30f63;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    /*margin-top: 20px;*/
    font-size: 1em;
}

.doh-btn:hover {
    background-color: #b50e56;
    transform: translateY(-2px);
}

.doh-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.doh-btn-light {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
}

.doh-btn-secondary,
.doh-btn-danger {
    background-color: rgba(244, 244, 244, 0.8);
    color: #141414;
    font-size: 1em;
}

.doh-btn-danger:hover,
.doh-btn-secondary:hover {
    background-color: rgba(244, 244, 244, 0.6);
    transform: translateY(-2px);
}


.doh-title.title-white {
    color: #ffffff;
}

.intro-section .doh-desc, .doh-title.title-white {
    font-size: 1.2rem;
}

.doh-log {
    border: 2px solid rgba(212, 0, 106, 0.2);
    border-radius: 8px;
    background: #fafafa00;
    padding: 10px;
    height: 420px;
    overflow: auto;
    backdrop-filter: blur(10px);
    color: #fff;
}

.doh-log-row {
    margin-bottom: 6px;
}

.doh-role {
    font-weight: 700;
    margin-right: 6px;
}

.doh-muted {
    color: #6b7280;
}

.small {
    font-size: 12px;
}

.doh-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}

.do-instruction {
    flex: 1;
    min-height: 220px;
    border: 1px solid #e5e7eb4f;
    padding: 8px;
    background: #fafafa;
    border-radius: 8px;
}

.doh-desc {
    margin-bottom: 1rem;
    line-height: 1.5em;
}


.doh-log-wrapper .doh-title.agent-name {
    padding-bottom: 8px;
}

.doh-help #system-prompt {
    font-size: 1.1rem;
    line-height: 1.6em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/*.doh-chat-input {
      margin-top: 20px;
}*/

.doh-chat-input .doh-input {
    flex: 1 1 0%;
}

.doh-main {
    display: flex;
    gap: 16px;
    flex-direction: column;
}

.doh-label.block {
    display: block;
    margin-bottom: 6px;
}


.doh-status {
    padding: 8px 10px;
    border-radius: 8px;
    margin: 8px 0;
    flex: 1 1 auto;
    min-width: 0;
}

.doh-status.wait {
    background: rgba(255, 200, 0, .08);
}

.doh-status.ready {
    background: rgba(0, 200, 0, .08);
}

.doh-status.error {
    background: rgba(200, 0, 0, .08);
}

.kb-input-group .title-white {
    margin-bottom: 0;
}

/*Slider*/
.slider-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
    flex: 1 1 auto;
    min-width: 0;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 333px;
    flex: 1 1 auto;
    min-width: 0;
}

.slider-label {
    background: #eeeeee;
    color: #1b1b1b;
    padding: 7px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.18px;
    text-align: center;
    min-width: 50px;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 7px;
    background: #eeeeee;
    border-radius: 40px;
    outline: none;
    position: relative;
    cursor: pointer;
    background-image: linear-gradient(90deg, #d30f63 70%, #eeeeee 70%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.range-slider::-webkit-slider-runnable-track {
    height: 16px;
    background: transparent;
    border-radius: 40px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    background: #d30f63;
    border-radius: 50%;
    box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.25);
    margin-top: -4px;
    cursor: pointer;
    border: none;
}

.range-slider::-moz-range-track {
    height: 16px;
    background: transparent;
    border-radius: 40px;
}

.range-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    background: #d30f63;
    border-radius: 50%;
    box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    border: none;
}

.range-slider:focus-visible {
    outline: 2px solid rgba(211, 15, 99, 0.6);
    outline-offset: 4px;
}

.slider-value {
    background: linear-gradient(90deg,
            rgba(244, 244, 244, 0.1),
            rgba(124, 2, 63, 0.1));
    border: 2px solid rgba(212, 0, 106, 0.2);
    border-radius: 7.32px;
    padding: 5.76px 10px;
    color: #f4f4f4;
    font-size: 1rem;
    line-height: 29.28px;
    letter-spacing: 0.2196px;
    text-align: center;
    min-width: 40px;
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    justify-content: flex-end;
}


/*Knowledge base section*/
.knowledge-base-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.kb-header {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Components */
/*File list delete buttons*/
.kb-chip-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kb-chip-item {
  background: rgba(255,255,255,0.08);
  color: #ccc;
  font-size: 13px;
  border-radius: 12px;
  padding: 3px 8px 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kb-chip-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.kb-chip-remove:hover {
  color: #f36;
}

.upload-section,
.url-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.upload-info,
.url-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-upload-area {
    background: linear-gradient(90deg,
            rgba(244, 244, 244, 0.1),
            rgba(124, 2, 63, 0.1));
    border: 1px dashed #d30f63;
    border-radius: 20px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 215px;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.file-upload-area:hover {
    border-color: #d30f63;
    background: linear-gradient(90deg,
            rgba(244, 244, 244, 0.14),
            rgba(124, 2, 63, 0.14));
}

.file-upload-area:focus-visible {
    outline: 2px solid rgba(211, 15, 99, 0.6);
    outline-offset: 4px;
}

.file-upload-area.drag-over {
    border-color: #ffffff;
    background: linear-gradient(90deg,
            rgba(244, 244, 244, 0.25),
            rgba(211, 15, 99, 0.25));
}

.upload-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    text-align: center;
}

.upload-main-text {
    font-size: 16px;
    line-height: 24px;
    color: #f4f4f4;
    letter-spacing: -0.16px;
    margin-bottom: 8px;
}

.semi-bold {
    font-weight: 600;
}

.bold {
    font-weight: 700;
}

.upload-sub-text {
    font-size: 14px;
    line-height: 24px;
    color: rgba(244, 244, 244, 0.6);
    letter-spacing: -0.14px;
}

.url-input-container {
    background: linear-gradient(90deg,
            rgba(244, 244, 244, 0.1),
            rgba(124, 2, 63, 0.1));
    border: 1px solid #d30f63;
    border-radius: 20px;
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 22px;
    line-height: 30px;
    color: rgba(244, 244, 244, 0.6);
    font-family: "Titillium Web", sans-serif;
}

.url-input:focus {
    color: #f4f4f4;
}

/* File and URL Items */
.file-item,
.url-item {
    background: rgba(244, 244, 244, 0.2);
    border-radius: 20px;
    padding: 12px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.file-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.file-name {
    font-size: 1rem;
    line-height: 25px;
    color: #f4f4f4;
}

.file-size {
    font-size: 14px;
    line-height: 25px;
    color: rgba(244, 244, 244, 0.6);
}

.url-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.url-text {
    font-size: 18px;
    line-height: 25px;
    color: #f4f4f4;
    flex: 1;
}

.close-btn {
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.close-btn svg {
    width: 100%;
    height: 100%;
}

.close-btn:hover {
    opacity: 0.7;
}

.uploaded-files {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kb-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.is-hidden {
    display: none !important;
}

/* Accessible utility */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Upload errors & file list helpers */
.upload-errors {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.upload-error {
    background: rgba(211, 15, 99, 0.18);
    border: 1px solid #d30f63;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 20px;
    color: #f4f4f4;
    animation: fadeHold 4s ease forwards;
}

.empty-files {
    font-size: 14px;
    line-height: 20px;
    color: rgba(244, 244, 244, 0.6);
    padding: 4px 0;
}

#selected-files .file-item {
    position: relative;
}

#selected-files .file-item .close-btn {
    transition: opacity 0.2s ease;
}

/* Base input look to blend with your glass background */
input[type="file"].doh-file,
input[type="text"].doh-url, .doh-input.kb-source-list {
    color: var(--text-muted, #e6e6e6);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
    flex: 1 1 auto;
    min-width: 0;
}

/* The “Choose files” button inside the input */
.doh-row input[type="file"].doh-file::file-selector-button {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    margin-right: 12px;
    font: inherit;
    cursor: pointer;

    /* Match your primary button */
    background: linear-gradient(180deg, #E11C70 0%, #D30F63 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(211, 15, 99, 0.35);
    transition: transform .06s ease, box-shadow .2s ease, filter .2s ease;
}

.doh-row input[type="file"].doh-file::file-selector-button:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 22px rgba(211, 15, 99, 0.45);
}

.doh-row input[type="file"].doh-file::file-selector-button:active {
    transform: translateY(1px);
}

.doh-row input[type="file"].doh-file:focus-visible {
    outline: 2px solid rgba(211, 15, 99, 0.6);
    outline-offset: 2px;
    border-color: rgba(211, 15, 99, 0.6);
}

.save-reset-btn {
    justify-content: flex-end;
    margin-top: 20px;
}

/*Sources list*/
.doh-input.kb-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.doh-input.kb-source-list .kb-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.kb-chip {
    padding: .25rem .8rem;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-size: .875rem;
}

.kb-chip.url {
    border-style: dashed;
}

.kb-input-group {
    display: flex;
    gap: 1.2rem;
    width: 100%;
    flex-direction: column;
}

.kb-input-group .doh-input,
.kb-source-list.doh-input {
    flex: 1;
}

.kb-input-group .doh-input.doh-url {
    padding: 21px 12px;
}

.is-readonly,
.is-readonly * {
  pointer-events: none;
  user-select: none;
  opacity: .7;          /* or whatever you like */
  filter: grayscale(1); /* optional */
}

/* Modal */
.doh-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.70);
    z-index: 9999;
}

.doh-modal {
    width: min(560px, 94vw);
    background: linear-gradient(90deg, rgba(244, 244, 244, 0.1), rgba(124, 2, 63, 0.1));
    color: #fff;
    border-radius: 16px;
    border: 2px solid #d5016b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 75px 44px;
    backdrop-filter: blur(12px);
}

.doh-modal-footer {
    display: none;
}

.doh-btn.doh-btn-attach {
    background: #d5016b;
}

.doh-modal-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 30px;
}

.doh-modal-body {
    font-size: 1rem;
    line-height: 1.5;
    margin: 12px 0 8px;
}

.doh-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.doh-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Spinner */
.doh-spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #eee;
    border-top-color: #555;
    animation: doh-spin 0.8s linear infinite;
    display: inline-block;
    margin: 8px 0;
}

/* ===== Chat bubbles (glassmorphism) ===== */
/*.doh-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  max-height: 46vh;
  overflow-y: auto;
}*/

.doh-bubble {
    position: relative;
    max-width: 78%;
    padding: 14px 16px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    line-height: 1.45;
    font-size: 1rem;
    color: #EDEDF1;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* User bubble (right, brighter glass) */
.doh-bubble.doh-bubble--me {
    margin-left: auto;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.18);
}

/* Assistant bubble (left, tinted glass) */
.doh-bubble.doh-bubble--bot {
    margin-right: auto;
    background: linear-gradient(135deg,
            rgba(255, 0, 128, 0.10),
            rgba(255, 0, 128, 0.04));
    border-color: rgba(255, 0, 128, 0.25);
}

/* Optional tiny label above each bubble */
.doh-bubble-label {
    font-size: 11px;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 4px 4px;
}

/* Subtle appear animation */
@keyframes bubbleIn {
    from {
        transform: translateY(6px) scale(.98);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.doh-bubble {
    animation: bubbleIn .18s ease-out;
}

/* If you already have a .doh-log used for system logs,
   we’ll keep it but make it less prominent. */
.doh-log {
    font-size: 12px;
    opacity: .9;
}

/* wrapper that hosts label + bubble */
.doh-bubble-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* left vs right alignment */
.doh-bubble-wrap.bot {
    align-items: flex-start;
}

.doh-bubble-wrap.me {
    align-items: flex-end;
}

/* label styling stays the same, but align per side */
.doh-bubble-label {
    font-size: 0.9rem;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 6px 2px;
}

.doh-bubble-wrap.me .doh-bubble-label {
    text-align: right;
}

.doh-bubble-wrap.bot .doh-bubble-label {
    text-align: left;
}




@keyframes doh-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 600px) {
    #do-agent-hub {
    grid-template-columns: 1fr;
    justify-items: center;
    }

    .page_content_wrap {
        padding: 0 16px;  
    }
}