/* ─── RESET & BASE ───────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e27;
    color: #e0e0e0;
}

/* Dashboard locks body scroll — workspace handles its own overflow */
body:has(.workspace) {
    overflow: hidden;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #0f1429; }
::-webkit-scrollbar-thumb { background: #2d3561; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d4571; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.workspace {
    display: grid;
    grid-template-rows: 60px 1fr 48px;
    height: 100vh;
    width: 100vw;
}
.main-content {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    overflow: hidden;
}

/* ─── TOP BAR ────────────────────────────────────────────────────────────── */
.top-bar {
    background: #12172e;
    border-bottom: 1px solid #1e2647;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
}
.top-bar-brand {
    display: flex; align-items: center; gap: 8px;
    margin-right: auto;
}
.top-bar-logo {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1em; color: #667eea; flex-shrink: 0;
}
.top-bar-logo img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 4px;
}
.logo-text {
    font-size: 1.35em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #1a1f3a; border-radius: 7px;
    border: none; font-size: 1em; color: #e0e0e0;
    cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: #2d3561; }
.hamburger { display: flex; }

/* ─── LEFT SIDEBAR ───────────────────────────────────────────────────────── */
.sidebar {
    background: #0c1022;
    border-right: 1px solid #1e2647;
    overflow-y: auto;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.nav-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 11px; border-radius: 7px;
    cursor: pointer; user-select: none;
    transition: background .13s;
    font-size: .875em; font-weight: 500;
    position: relative;
}
.nav-item:hover  { background: #17203a; }
.nav-item.active { background: #17203a; color: #7c8ff0; }
.nav-icon  { font-size: 1.05em; min-width: 20px; text-align: center; }
.nav-label { flex: 1; }
.nav-arrow { color: #4b5280; font-size: .75em; transition: transform .2s; flex-shrink: 0; }

.nav-sub {
    padding-left: 16px;
    display: flex; flex-direction: column; gap: 1px;
    max-height: 0; overflow: hidden;
    transition: max-height .28s ease;
}
.nav-sub.open  { max-height: 320px; }
.nav-sub-item  { font-size: .84em; padding: 6px 10px; }

/* Badge */
.badge {
    background: #ef4444; color: #fff;
    border-radius: 99px; min-width: 17px; height: 17px;
    font-size: .68em; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
    border: 2px solid #0c1022; flex-shrink: 0;
}
.badge.hidden { display: none; }

/* Job dots */
.job-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.job-dot.hidden  { display: none; }
.job-dot.yellow  { background: #fbbf24; }
.job-dot.red     { background: #f87171; }
.job-dot.green   { background: #34d399; }

/* ─── CANVAS ─────────────────────────────────────────────────────────────── */
.canvas-area {
    background: #080c1c;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.canvas-header {
    height: 48px; padding: 0 18px;
    background: #0c1022; border-bottom: 1px solid #1e2647;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0; gap: 12px;
}
.canvas-title { font-size: .95em; font-weight: 600; color: #7c8ff0; white-space: nowrap; }
.canvas-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.canvas-body { flex: 1; overflow-y: auto; padding: 22px; }


/* ─── RIGHT PANEL ────────────────────────────────────────────────────────── */
/*
 * Right panel is a flex column with three named sections:
 *   #rp-ctx       — context (conversations / assets / agents / sub-filters)
 *   #rp-jobs      — active jobs (hidden unless rp-has-jobs is set)
 *   #rp-shortcuts — shortcuts (always visible)
 *
 * Without active-jobs: ctx = 50%, shortcuts = 50%
 * With active-jobs:    ctx = 33%, jobs = 34%, shortcuts = 33%
 */

.right-panel {
    background: #0c1022;
    border-left: 1px solid #1e2647;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* Each named section is a flex child */
.rp-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;    /* critical: lets flex shrink below content size */
    flex: 1 1 0;      /* default: all equal */
    border-bottom: 1px solid #1e2647;
}
.rp-section:last-child { border-bottom: none; }

/* Without active jobs: 2 sections → each 50% */
/* When jobs panel is hidden, it takes no space */
.rp-section.hidden {
    display: none;
}

/* With active jobs (class on panel): split into thirds */
.rp-has-jobs .rp-section { flex: 1 1 0; }

/* Title bar inside each section */
.rp-title {
    font-size: .68em; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    color: #4b5280;
    padding: 10px 10px 6px;
    flex-shrink: 0;
}

/* Scrollable body inside each section */
.rp-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ─── ACTIVE JOBS ROWS ───────────────────────────────────────────────────── */
.active-job-row {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 8px; border-radius: 6px; cursor: pointer;
    font-size: .8em; margin-bottom: 2px;
    transition: filter .13s;
}
.active-job-row:hover { filter: brightness(1.2); }
.active-job-name         { flex: 1; color: #c0c0d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-job-status-label { font-size: .75em; color: #6b7280; flex-shrink: 0; }

/* ─── SHORTCUTS ──────────────────────────────────────────────────────────── */
.shortcut-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 8px; background: #151a30;
    border-radius: 6px; cursor: pointer; font-size: .82em;
    border: 1px solid transparent; transition: border .13s;
    position: relative; flex-shrink: 0;
}
.shortcut-item:hover { border-color: #667eea; }
.shortcut-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }
.shortcut-icon svg { width: 16px; height: 16px; display: block; }
.shortcut-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-delete {
    opacity: 0; background: none; border: none;
    color: #f87171; font-size: .95em; cursor: pointer;
    transition: opacity .13s; padding: 2px 3px; flex-shrink: 0;
}
.shortcut-item:hover .shortcut-delete { opacity: 1; }
.shortcut-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 7px 10px; border-radius: 6px;
    font-size: .8em; color: #667eea; cursor: pointer;
    border: 1.5px dashed #2d3561; background: transparent;
    width: 100%; transition: border-color .13s; margin-top: 4px;
    flex-shrink: 0;
}
.shortcut-add-btn:hover { border-color: #667eea; }

/* ─── CONVERSATIONS (ctx panel) ──────────────────────────────────────────── */
.conv-new-btn { margin-top: 6px; margin-bottom: 6px; width: 100%; flex-shrink: 0; }
.conv-item {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 7px 8px; background: #151a30; border-radius: 5px;
    cursor: pointer; border: 1px solid transparent; transition: border .13s;
    flex-shrink: 0;
}
.conv-item:hover { border-color: #667eea; }
.conv-item-content { flex: 1; min-width: 0; }
.conv-title { font-size: .81em; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-date  { font-size: .72em; color: #4b5280; margin-top: 2px; }
.conv-delete { background: none; border: none; color: #f87171; font-size: .9em; cursor: pointer; padding: 1px 3px; flex-shrink: 0; }

/* ─── CONTEXT ITEMS ──────────────────────────────────────────────────────── */
.ctx-item {
    padding: 7px 8px; background: #151a30;
    border-radius: 5px; cursor: pointer; font-size: .82em;
    border: 1px solid transparent; transition: border .13s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-shrink: 0;
}
.ctx-item:hover { border-color: #667eea; }

.ctx-agent-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 8px; border-radius: 6px; cursor: pointer;
    font-size: .82em; border: 1px solid transparent; transition: border .13s;
    flex-shrink: 0;
}

.ctx-agent-item:hover { border-color: #2d3561; }
.ctx-agent-info   { flex: 1; min-width: 0; }
.ctx-agent-name   { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88em; }
.ctx-agent-status { font-size: .74em; color: #6b7280; margin-top: 1px; }

/* Asset folders */
.ctx-asset-folder { flex-shrink: 0; }
.ctx-asset-folder-header {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 8px; background: #151a30; border-radius: 6px;
    cursor: pointer; font-size: .82em;
    border: 1px solid transparent; transition: border .13s;
}
.ctx-asset-folder-header:hover { border-color: #2d3561; }
.ctx-folder-name  { flex: 1; font-weight: 600; }
.ctx-folder-count { font-size: .72em; color: #4b5280; }
.ctx-folder-arrow { font-size: .72em; color: #4b5280; transition: transform .18s; flex-shrink: 0; }
.ctx-asset-folder-contents { padding: 4px 0 2px 8px; display: flex; flex-direction: column; gap: 2px; }
.ctx-asset-folder-contents.hidden { display: none; }
.ctx-asset-item {
    display: flex;
    align-items: center;
    font-size: .78em;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.ctx-asset-item:hover {
    background: #151a30;
    border-color: #2d3561;
}

.ctx-asset-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctx-asset-delete {
    margin-left: auto;
    width: 20px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ctx-asset-delete:hover {
    background: #b71c1c;
}

.ctx-asset-delete:active {
    transform: scale(0.95);
}

/* Community portal */
.ctx-search-wrap {
    display: flex; gap: 5px; align-items: center; flex-shrink: 0;
}

/* ─── BOTTOM BAR ─────────────────────────────────────────────────────────── */
.bottom-bar {
    background: #0c1022;
    border-top: 1px solid #1e2647;
    display: flex; align-items: center;
    padding: 0 18px; gap: 14px;
    font-size: .8em;
}
.bb-item { display: flex; align-items: center; gap: 5px; }
.bb-label { color: #4b5280; }
.bb-value { color: #c0c0d0; font-weight: 600; }
.bb-sep   { width: 1px; height: 14px; background: #1e2647; }
.bb-dot   { font-size: .8em; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: pulse 2s infinite; }
.status-dot.disconnected { background: #f87171; animation: none; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
    padding: 8px 16px; background: #667eea;
    border: none; border-radius: 6px; color: #fff;
    cursor: pointer; font-weight: 600; font-size: .85em;
    transition: background .13s, transform .1s; white-space: nowrap;
}
.btn-primary:hover  { background: #5568d3; }
.btn-primary:active { transform: scale(.97); }
.btn-primary.small  { padding: 5px 11px; font-size: .78em; }
.btn-primary.secondary { background: #1a1f3a; color: #c0c0d0; }
.btn-primary.secondary:hover { background: #2d3561; }

.action-btn {
    padding: 8px 16px; background: #667eea;
    border: none; border-radius: 6px; color: #fff;
    cursor: pointer; font-weight: 600; font-size: .85em;
    transition: background .13s;
}
.action-btn:hover { background: #5568d3; }
.action-btn.secondary { background: #1a1f3a; color: #c0c0d0; }
.action-btn.secondary:hover { background: #2d3561; }

/* ─── MODALS ─────────────────────────────────────────────────────────────── */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.82); backdrop-filter: blur(5px);
    justify-content: center; align-items: center; padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: #111628; border: 1px solid #2d3561;
    border-radius: 12px; padding: 26px;
    display: flex; flex-direction: column; gap: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
    overflow-y: auto; max-height: 90vh; width: min(700px, 95vw);
}
.modal-fullscreen { width: 92vw; height: 88vh; max-width: 92vw; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 14px; border-bottom: 1px solid #2d3561; flex-shrink: 0;
}
.modal-title { font-size: 1.15em; color: #7c8ff0; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.7em; color: #4b5280; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #f87171; }
.modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding-top: 10px; border-top: 1px solid #2d3561; flex-shrink: 0; margin-top: auto;
}

/* ─── CHAT ───────────────────────────────────────────────────────────────── */
.chat-main {
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 48px - 48px - 44px);
    overflow: hidden;
    width: min(100%, 1000px);
    margin: 0 auto;
}

.chat-history {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 11px;
}
.chat-msg {
    max-width: 72%; padding: 10px 14px; border-radius: 10px;
    font-size: .88em; line-height: 1.55;
}
.chat-msg.user {
    background: #667eea; color: #fff;
    align-self: flex-end; border-bottom-right-radius: 3px;
}
.chat-msg.assistant {
    background: #151a30; color: #d8d8e8;
    align-self: flex-start; border-bottom-left-radius: 3px;
}
.chat-msg p { margin: 0; }


.chat-input-area {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 16px;
    border-top: 1px solid #1e2647;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: end;
    flex-shrink: 0;
}


.chat-input {
    grid-area: input;
    width: 100%;
    padding: 9px 12px;
    background: #080c1c;
    border: 1px solid #2d3561;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: .88em;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    align-self: center;
}


.chat-input-area {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 16px;
    border-top: 1px solid #1e2647;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "options options"
        "input send";
    gap: 8px 12px;
    align-items: center;
    flex-shrink: 0;
}

.chat-input:focus { border-color: #667eea; outline: none; }


.chat-options-row {
    grid-area: options;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

.chat-options-row > * {
    flex: 1 1 0;
    min-width: 0;
}

.send-btn {
    grid-area: send;
    align-self: center;
    justify-self: end;
}

/* ─── GENERATION FORMS ───────────────────────────────────────────────────── */
.gen-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.gen-label { font-size: .78em; font-weight: 600; color: #8a90b0; margin-bottom: 5px; display: block; }
.gen-textarea {
    width: 100%; min-height: 100px; padding: 11px;
    background: #0c1022; border: 1px solid #2d3561;
    border-radius: 7px; color: #e0e0e0; font-size: .88em;
    resize: vertical; font-family: inherit; line-height: 1.6;
}
.gen-textarea:focus { border-color: #667eea; outline: none; }
.gen-textarea.tall { min-height: 150px; }
.gen-options-row {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    align-items: flex-start;
}
.gen-select-wrap {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
}
.gen-select,
.gen-input {
    width: 100%;
    padding: 8px 10px;
    background: #0c1022;
    border: 1px solid #2d3561;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: .85em;
}

.gen-select:focus, .gen-input:focus { border-color: #667eea; outline: none; }
.gen-select option { background: #111628; }

.audio-sub {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.audio-sub.hidden { display: none; }

.file-upload-zone {
    width: 100%;
    padding: 22px;
    border: 1.5px dashed #2d3561;
    border-radius: 7px;
    text-align: center;
    cursor: pointer;
    color: #4b5280;
    font-size: .85em;
    position: relative;
    background: #0c1022;
    transition: border-color .13s;
}

.file-upload-zone:hover { border-color: #667eea; color: #667eea; }

.file-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.mic-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #0c1022;
    border-radius: 7px;
    width: 100%;
}
.record-status { font-size: .82em; color: #4b5280; }
.record-status.recording { color: #f87171; }
.action-btn.recording { background: #f87171; }

/* ─── KLOEBOT BUILDER ────────────────────────────────────────────────────── */
.bot-builder-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.bot-builder-title {
    font-size: 1.1em; font-weight: 700; color: #c0c0d0;
    padding-bottom: 12px; border-bottom: 1px solid #1e2647;
}
.bot-field-row { display: flex; flex-direction: column; gap: 6px; }
.bot-logo-zone { width: 150px; height: 150px; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; align-self: center;}
.bot-text-input { width: 100%; }
.bot-create-btn {
    align-self: center;
    margin-top: 4px;
    min-width: 160px;
}

/* Knowledge base modal */
#bot-logo-zone img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
}
#bot-kb-zone img {
    max-width: 100%;
}

/* ─── KLOEHUB ────────────────────────────────────────────────────────────── */
.hub-subsection-title {
    font-size: .76em; color: #4b5280; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    margin: 6px 0 4px;
}
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.hub-card {
    background: #111628; border: 1px solid #1e2647; border-radius: 9px;
    padding: 14px; display: flex; flex-direction: column; gap: 6px;
    transition: border-color .15s, background .15s;
}
.hub-card:hover { border-color: #2d3561; background: #141930; }
.hub-card-name { font-size: .88em; font-weight: 600; color: #d0d0e0; line-height: 1.3; }
.hub-card-meta { font-size: .74em; color: #4b5280; line-height: 1.4; }
.hub-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.hub-tag { font-size: .68em; padding: 2px 7px; background: #1e2647; border-radius: 99px; color: #8a90b8; font-weight: 500; }
.hub-card-status {
    display: inline-block; font-size: .68em; font-weight: 700;
    padding: 2px 8px; border-radius: 99px; margin-top: 2px; width: fit-content;
    text-transform: uppercase; letter-spacing: .04em;
}
.status-active   { background: rgba(52,211,153,.12); color: #34d399; }
.status-draft    { background: rgba(251,191,36,.1);  color: #fbbf24; }
.status-watchdog { background: rgba(102,126,234,.12); color: #7c8ff0; }

/* ─── COMMUNITY LIBRARY ──────────────────────────────────────────────────── */
.community-card {
    background: #111628; border: 1px solid #1e2647; border-radius: 9px;
    padding: 16px; display: flex; flex-direction: column; gap: 5px;
    transition: border-color .15s, background .15s;
}
.community-card:hover { border-color: #2d3561; background: #141930; }

/* ─── KLOEACTIVITY ───────────────────────────────────────────────────────── */
.activity-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}
/* Single row of top-level filter pills on canvas */
.filter-row { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-pill {
    padding: 4px 12px; border-radius: 99px; font-size: .78em;
    background: #151a30; border: 1px solid #1e2647;
    cursor: pointer; transition: all .13s; color: #c0c0d0;
}
.filter-pill:hover  { border-color: #2d3561; }
.filter-pill.active { background: #667eea; border-color: #667eea; color: #fff; }
.activity-feed {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.activity-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid #111628; font-size: .85em;
    flex-wrap: wrap;
}
.activity-action { color: #c0c0d0; flex: 1; min-width: 160px; }
.activity-meta   { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.activity-tag    { font-size: .7em; padding: 2px 7px; border-radius: 99px; background: #1e2647; color: #7c8ff0; font-weight: 600; }
.activity-tag.sub { background: #151a30; color: #4b5280; }
.activity-time   { color: #4b5280; font-size: .75em; white-space: nowrap; flex-shrink: 0; }

/* ─── AGENT / JOB MODALS ─────────────────────────────────────────────────── */
.agent-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px; border-radius: 99px; font-size: .8em; font-weight: 600;
}

.agent-error-note { font-size: .86em; color: #f87171; line-height: 1.6; }
#agent-send-btn {
    grid-area: send;
    align-self: center;
    justify-self: end;
}


/* ─── EDITOR ─────────────────────────────────────────────────────────────── */

.editor-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 48px - 48px);
    background: #080c1c;
    gap: 12px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.editor-canvas {
    flex: 1;
    width: 100%;
    background: #0a0e1c;
    border: 2px dashed #1e2647;
    border-radius: 8px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    max-height: 500px;
    transition: border-color .15s;
    position: relative;
}

.editor-canvas.drag-over { border-color: #667eea; background: rgba(102,126,234,.04); }
.editor-canvas-empty { color: #3d4270; font-size: .9em; text-align: center; pointer-events: none; }
.editor-placed-asset {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px; background: #111628; border-radius: 8px;
    border: 1px solid #2d3561; min-width: 160px;
}
.editor-asset-type { font-size: .72em; color: #4b5280; text-transform: uppercase; letter-spacing: .06em; }
.editor-asset-id   { font-size: .88em; font-weight: 600; color: #c0c0d0; }
.editor-toolbar {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    flex-wrap: wrap;
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 8px;
    flex-shrink: 0;
    width: 100%;
}

.gen-wrap > .btn-primary,
.editor-wrap > .btn-primary {
    align-self: center;
    margin-top: 6px;
    min-width: 140px;
}

.image-ref-zone img,
#video-ref-zone img,
.editor-placed-asset img,
.editor-placed-asset video,
.editor-placed-asset audio {
    max-width: 100%;
}

.editor-tool-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 12px; background: #151a30; border-radius: 7px;
    cursor: pointer; transition: background .13s; min-width: 56px;
    border: 1px solid transparent;
}
.editor-tool-btn:hover { background: #1e2647; border-color: #2d3561; }
.editor-tool-icon  { font-size: 1.2em; }
.editor-tool-label { font-size: .66em; color: #6b7280; font-weight: 500; white-space: nowrap; }
.editor-timeline { padding: 10px 14px; background: #0c1022; border-top: 1px solid #1e2647; min-height: 56px; font-size: .82em; color: #3d4270; flex-shrink: 0; }
.editor-timeline-empty { text-align: center; padding: 10px; }

/* ─── CONFIG MODAL ───────────────────────────────────────────────────────── */
.config-section {
    display: flex; flex-direction: column; gap: 10px;
    padding-bottom: 18px; border-bottom: 1px solid #1e2647;
}
.config-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.config-section h4 {
    color: #7c8ff0; font-size: .78em; text-transform: uppercase;
    letter-spacing: .08em; font-weight: 700;
    padding-bottom: 6px; border-bottom: 1px solid #1e2647;
}
.config-item { display: flex; align-items: center; gap: 12px; }
.config-label { min-width: 130px; font-size: .83em; color: #8a90b8; font-weight: 500; flex-shrink: 0; }
.config-select-wrap { flex: 1; }
.config-select, .config-input {
    width: 100%; padding: 8px 10px;
    background: #080c1c; border: 1px solid #2d3561;
    border-radius: 6px; color: #e0e0e0; font-size: .85em;
}
.config-select:focus, .config-input:focus { border-color: #667eea; outline: none; }
.config-select option { background: #111628; }

/* Notifications — checkbox + label perfectly centered */

/* ─── SHORTCUT PICKER ────────────────────────────────────────────────────── */
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 7px; }
.picker-card {
    padding: 13px 10px; background: #151a30;
    border: 1.5px solid transparent; border-radius: 8px;
    cursor: pointer; text-align: center; transition: border .13s;
    display: flex; flex-direction: column; align-items: center;
}
.picker-card:hover    { border-color: #667eea; }
.picker-card.selected { border-color: #667eea; background: rgba(102,126,234,.1); }
.picker-card.added    { opacity: .38; pointer-events: none; }
.picker-icon  {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin: 0 auto 6px;
}
.picker-icon svg { width: 22px; height: 22px; display: block; }
.picker-name  { font-size: .8em; font-weight: 600; }
.picker-group { font-size: .7em; color: #4b5280; margin-top: 2px; }

/* ─── HUB DRIVE (OneDrive-style KloeHub) ─────────────────────────────────── */
.hub-drive-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}
.hub-drive-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #1e2647;
    flex-shrink: 0;
    width: 100%;
}
.hub-drive-search {
    flex: 1; background: #111628; border: 1px solid #1e2647; border-radius: 6px;
    padding: 5px 10px; font-size: .82em; color: #d0d0e0; outline: none;
}
.hub-drive-search:focus { border-color: #667eea; }
.hub-drive-toolbar-sep { width: 1px; height: 20px; background: #1e2647; }
.hub-drive-view-btns { display: flex; gap: 2px; }
.hub-drive-view-btn {
    background: none; border: 1px solid transparent; border-radius: 5px;
    color: #4b5280; padding: 3px 7px; font-size: .9em; cursor: pointer; transition: all .12s;
}
.hub-drive-view-btn.active, .hub-drive-view-btn:hover { background: #1e2647; border-color: #2d3561; color: #d0d0e0; }
.hub-drive-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    width: 100%;
}
.hub-drive-section { border-bottom: 1px solid #111628; }
.hub-drive-section:last-child { border-bottom: none; }
.hub-drive-section-header {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px; cursor: pointer; user-select: none;
    font-size: .82em; font-weight: 600; color: #8a90b8;
    transition: background .1s;
}
.hub-drive-section-header:hover { background: #111628; }
.hub-drive-sec-icon { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hub-drive-sec-icon svg { width: 14px; height: 14px; }
.hub-drive-sec-title { flex: 1; }
.hub-drive-sec-count { font-size: .75em; color: #3d4270; font-weight: 400; }
.hub-drive-sec-arrow { font-size: .7em; transition: transform .15s; color: #3d4270; }
.hub-drive-section-body { padding: 0 0 4px; }

/* List view */
.hub-drive-list-header {
    display: grid; grid-template-columns: 1fr 90px 90px 80px;
    padding: 4px 14px; font-size: .72em; color: #3d4270; font-weight: 600;
    border-bottom: 1px solid #111628;
}
.hub-drive-list-row {
    display: grid; grid-template-columns: 1fr 90px 90px 80px;
    padding: 5px 14px; align-items: center; border-bottom: 1px solid #0d1020;
    transition: background .1s;
}
.hub-drive-list-row:hover { background: #111628; }
.hub-drive-col-name { display: flex; align-items: center; gap: 7px; font-size: .82em; color: #d0d0e0; overflow: hidden; }
.hub-drive-col-type, .hub-drive-col-status { font-size: .75em; color: #4b5280; }
.hub-drive-col-actions { display: flex; gap: 4px; justify-content: flex-end; }
.hub-drive-row-icon { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hub-drive-row-icon svg { width: 13px; height: 13px; }
.hub-drive-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-drive-row-btn {
    background: none; border: 1px solid #1e2647; border-radius: 4px;
    color: #8a90b8; padding: 2px 7px; font-size: .72em; cursor: pointer; transition: all .1s;
}
.hub-drive-row-btn:hover { background: #1e2647; color: #d0d0e0; }
.hub-drive-row-btn.danger { color: #f87171; }
.hub-drive-row-btn.danger:hover { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); }
.hub-drive-badge {
    display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: .72em; font-weight: 600;
}
.hub-drive-badge.blue  { background: rgba(102,126,234,.15); color: #667eea; }
.hub-drive-badge.gray  { background: #1a1f38; color: #4b5280; }
.hub-drive-badge.green { background: rgba(74,222,128,.12); color: #4ade80; }

/* Grid view */
.hub-drive-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px; padding: 8px 12px;
}
.hub-drive-grid-card {
    background: #111628; border: 1px solid #1a1f38; border-radius: 7px;
    overflow: hidden; cursor: pointer; transition: border-color .12s;
    display: flex; flex-direction: column;
}
.hub-drive-grid-card:hover { border-color: #2d3561; }
.hub-drive-grid-thumb { width: 100%; aspect-ratio: 1; background: #0d1020; overflow: hidden; }
.hub-drive-grid-thumb-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hub-drive-grid-thumb-icon svg { width: 28px; height: 28px; opacity: .5; }
.hub-drive-grid-name { font-size: .73em; color: #d0d0e0; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-drive-grid-actions { display: flex; gap: 3px; padding: 0 4px 5px; }
.empty-state.small { font-size: .75em; padding: 8px 14px; text-align: left; }

/* Activity ctx filter */
.ctx-filter-wrap { margin-bottom: 10px; }
.ctx-activity-total { margin-bottom: 10px; }

/* Config hint */
.config-hint { font-size: .72em; color: #4b5280; margin-top: 3px; line-height: 1.4; }

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; color: #3d4270; padding: 14px 8px; font-size: .82em; }
.muted-note  { font-size: .82em; color: #4b5280; line-height: 1.6; }
.hidden      { display: none !important; }

/* ─── MOBILE / TABLET ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    body:has(.workspace) {
        overflow: hidden;
    }

    .workspace {
        grid-template-rows: 60px 1fr 48px;
        height: 100dvh;
        width: 100vw;
    }

    .main-content {
        grid-template-columns: 1fr !important;
        overflow: hidden;
    }

    .canvas-area {
        min-width: 0;
        width: 100%;
    }

    .sidebar,
    .right-panel {
        position: fixed;
        top: 60px;
        bottom: 48px;
        z-index: 220;
        transition: transform .25s ease;
        will-change: transform;
    }

    .sidebar {
        left: 0;
        width: min(82vw, 300px);
        transform: translateX(-100%);
    }

    .right-panel {
        right: 0;
        width: min(86vw, 320px);
        transform: translateX(100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .right-panel.mobile-open {
        transform: translateX(0);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 60px 0 48px 0;
        z-index: 210;
        background: rgba(0, 0, 0, .55);
    }

    .mobile-overlay.active {
        display: block;
    }

    .canvas-header {
        padding: 0 12px;
        gap: 8px;
    }

    .canvas-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .canvas-header-actions {
        gap: 6px;
    }

    .canvas-body {
        padding: 12px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .chat-main {
        height: 100%;
        min-height: 0;
    }

    .chat-history {
        max-width: 100%;
        padding: 12px;
        gap: 10px;
    }

    .chat-msg.user {
        max-width: 72%;
    }

    .chat-input-area {
        max-width: 100%;
        width: 100%;
        padding: 10px 12px;
    }

    .chat-options-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .chat-options-row > * {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
    }

    .send-btn {
        min-width: 88px;
    }

    .gen-wrap,
    .editor-wrap {
        max-width: 100%;
        width: 100%;
    }

    .gen-options-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gen-select-wrap {
        flex: 1 1 calc(50% - 5px);
        min-width: 160px;
    }

    .gen-textarea,
    .gen-select,
    .gen-input,
    .file-upload-zone,
    .mic-controls,
    .editor-toolbar,
    .editor-canvas {
        width: 100%;
        max-width: 100%;
    }

    .editor-wrap {
        height: auto;
        min-height: 100%;
    }

    .editor-canvas {
        min-height: 260px;
        max-height: none;
    }

    .editor-toolbar {
        gap: 6px;
        padding: 10px;
    }

    .editor-tool-btn {
        min-width: 56px;
        flex: 0 0 auto;
    }

    .hub-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .modal-fullscreen {
        width: 98vw;
        height: 92vh;
    }

    .logo-text {
        font-size: 1.2em;
    }
}


/* ─── PHONE ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .top-bar {
        padding: 0 10px;
        gap: 8px;
    }

    .top-bar-right {
        gap: 6px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .canvas-header {
        height: 44px;
        padding: 0 10px;
    }

    .canvas-title {
        font-size: .88em;
    }

    .canvas-body {
        padding: 10px;
    }

    .chat-history {
        padding: 10px;
        gap: 8px;
    }

    .chat-msg.user {
        max-width: 88%;
    }

    .chat-input-area {
        grid-template-columns: 1fr;
        grid-template-areas:
            "options"
            "input"
            "send";
        gap: 8px;
        padding: 10px;
    }

    .chat-input {
        min-height: 44px;
    }

    .send-btn {
        grid-area: send;
        justify-self: stretch;
        align-self: stretch;
        width: 100%;
        min-width: 0;
    }

    .chat-options-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .chat-options-row > * {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .gen-options-row {
        flex-direction: column;
        gap: 10px;
    }

    .gen-select-wrap {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .gen-wrap > .btn-primary,
    .editor-wrap > .btn-primary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .mic-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .editor-wrap {
        gap: 10px;
    }

    .editor-canvas {
        min-height: 220px;
    }

    .editor-toolbar {
        justify-content: flex-start;
        gap: 6px;
    }

    .editor-tool-btn {
        min-width: 48px;
        padding: 7px 8px;
    }

    .config-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-label {
        min-width: unset;
    }

    .bottom-bar {
        gap: 8px;
        font-size: .73em;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

}

/* ─── PUBLIC PAGES (append to oxiframe.css) ──────────────────────────────── */

/* Page shell — centered_block becomes a scroll container.
   Use min-height + dvh so iOS Safari's collapsing chrome
   doesn't trap the footer below the visible area. */
.pub-page {
    min-height: 100vh;
    min-height: 100dvh;   /* overrides above on browsers that support dvh */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch; /* smooth momentum on iOS */
}

/* Match the dashboard's 60px top-bar exactly */
.pub-ribbon {
    height: 60px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 300;
}

/* Side-drawer nav — sits below the ribbon, slides in from the left */
.pub-nav-drawer {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #0c1022;
    border-right: 1px solid #1e2647;
    z-index: 250;
    overflow-y: auto;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    transform: translateX(-100%);
    transition: transform .25s ease;
}
.pub-nav-drawer.open { transform: translateX(0); }

/* Section label inside drawer */
.pub-nav-section-label {
    font-size: .65em;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #4b5280;
    padding: 10px 11px 4px;
}

/* ── Hero section ─────────────────────────────────────────────────────────── */
.pub-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px 68px;
    position: relative;
}
.pub-hero-glow {
    position: absolute;
    top: -100px; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 700px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(102,126,234,.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.pub-eyebrow,
.pub-h1,
.pub-hero-sub,
.pub-cta-row {
    position: relative;
    z-index: 1;
}

.pub-eyebrow {
    font-size: .75em; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: #667eea; margin-bottom: 18px;
    padding: 5px 16px;
    background: rgba(102,126,234,.1);
    border: 1px solid rgba(102,126,234,.25);
    border-radius: 99px;
    width: fit-content;
    position: relative;
}
.pub-h1 {
    font-size: clamp(2em, 5vw, 3.6em);
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    max-width: 820px;
    margin-bottom: 22px;
    position: relative;
}
.pub-h1 .grad {
    background: linear-gradient(135deg, #667eea 30%, #764ba2 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pub-hero-sub {
    font-size: 1.07em;
    color: #8a90b8;
    max-width: 580px;
    line-height: 1.78;
    margin-bottom: 38px;
    position: relative;
}
.pub-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}
.btn-outline {
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid #2d3561;
    border-radius: 6px;
    color: #c0c0d0;
    font-size: .85em;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.btn-outline:hover { border-color: #667eea; color: #fff; }
.btn-primary.large { padding: 12px 30px; font-size: .97em; }

/* ── Content sections ─────────────────────────────────────────────────────── */
.pub-section {
    padding: 72px 32px;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.pub-section-full {
    padding: 72px 32px;
    background: #080c1c;
    border-top: 1px solid #1e2647;
    border-bottom: 1px solid #1e2647;
    flex-shrink: 0;
}
.pub-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.pub-section-label {
    font-size: .73em;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}
.pub-section-heading {
    font-size: clamp(1.5em, 3vw, 2.3em);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.2;
}
.pub-section-sub {
    font-size: .93em;
    color: #6b7280;
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 44px;
}

/* ── Product cards ────────────────────────────────────────────────────────── */
.pub-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 18px;
}
.pub-card-icon-wrap {
    width: 48px; height: 48px;
    border-radius: 11px;
    background: rgba(102,126,234,.1);
    border: 1px solid rgba(102,126,234,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5em;
}
.pub-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pub-card-name {
    font-size: 1.03em;
    font-weight: 800;
    color: #fff;
}
.pub-card-desc {
    font-size: .84em;
    color: #6b7280;
    line-height: 1.65;
    flex: 1;
}
.pub-feature-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 2px;
}
.pub-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .79em;
    color: #8a90b8;
}

.pub-card-link {
    font-size: .8em;
    font-weight: 700;
    color: #667eea;
    cursor: pointer;
    margin-top: 6px;
}
.pub-card-link:hover { color: #8ca0f5; }

/* ── How-it-works steps ───────────────────────────────────────────────────── */
.pub-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 40px;
}
.pub-step {
    text-align: center;
    padding: 24px 20px;
    border-right: 1px solid #1e2647;
}
.pub-step:last-child { border-right: none; }
.pub-step-num {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(102,126,234,.1);
    border: 1.5px solid rgba(102,126,234,.3);
    display: flex; align-items: center; justify-content: center;
    font-size: .93em; font-weight: 800; color: #667eea;
    margin: 0 auto 14px;
}
.pub-step-icon { font-size: 1.5em; margin-bottom: 10px; display: block; }
.pub-step-title { font-size: .91em; font-weight: 700; color: #d0d0e0; margin-bottom: 8px; }
.pub-step-desc  { font-size: .81em; color: #6b7280; line-height: 1.6; }

/* ── KloeHub highlight ────────────────────────────────────────────────────── */
.pub-hub-highlight {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 14px;
    padding: 36px;
}
.pub-hub-text { flex: 1; min-width: 240px; }
.pub-hub-title { font-size: 1.22em; font-weight: 800; color: #fff; margin-bottom: 12px; }
.pub-hub-desc  { font-size: .86em; color: #6b7280; line-height: 1.78; margin-bottom: 18px; }
.pub-pill-row  { display: flex; gap: 8px; flex-wrap: wrap; }
.pub-pill {
    padding: 5px 13px;
    background: #151a30;
    border: 1px solid #2d3561;
    border-radius: 99px;
    font-size: .78em;
    color: #c0c0d0;
    font-weight: 500;
}
.pub-hub-visual {
    flex: 1; min-width: 240px;
    background: #080c1c;
    border: 1px solid #1e2647;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pub-hub-vis-label {
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: #4b5280;
    margin-bottom: 4px;
    display: block;
}
.pub-hub-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: #0c1022;
    border-radius: 7px;
    border: 1px solid #1e2647;
}
.pub-hub-file-icon { font-size: 1.05em; flex-shrink: 0; }
.pub-hub-file-name {
    font-size: .81em; color: #c0c0d0; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* ── CTA band ─────────────────────────────────────────────────────────────── */
.pub-cta-band {
    text-align: center;
    padding: 88px 24px;
    background: linear-gradient(135deg, #080c1c 0%, #0c1022 100%);
    border-top: 1px solid #1e2647;
    flex-shrink: 0;
}
.pub-cta-heading {
    font-size: clamp(1.6em, 3vw, 2.5em);
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}
.pub-cta-sub {
    font-size: .93em;
    color: #6b7280;
    margin-bottom: 34px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.pub-footer {
    background: #080c1c;
    border-top: 1px solid #1e2647;
    padding: 48px 32px 24px;
    flex-shrink: 0;
    margin-top: auto;
}
.pub-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.pub-footer-top {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.pub-footer-brand { flex: 2; min-width: 200px; }
.pub-footer-brand-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    cursor: pointer;
}
.pub-footer-brand-desc {
    font-size: .83em;
    color: #4b5280;
    line-height: 1.7;
    max-width: 260px;
}
.pub-footer-col { flex: 1; min-width: 120px; }
.pub-footer-col-title {
    font-size: .7em;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #667eea;
    margin-bottom: 14px;
    display: block;
}
.pub-footer-link {
    font-size: .84em;
    color: #6b7280;
    margin-bottom: 9px;
    cursor: pointer;
    display: block;
    transition: color .13s;
}
.pub-footer-link:hover { color: #c0c0d0; }
.pub-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #1e2647;
    padding-top: 20px;
    font-size: .78em;
    color: #4b5280;
}
.pub-footer-socials { display: flex; gap: 10px; }
.pub-footer-social-btn {
    width: 30px; height: 30px;
    background: #151a30;
    border: 1px solid #1e2647;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #6b7280;
    cursor: pointer;
    font-size: .85em;
    transition: border-color .13s, color .13s;
}
.pub-footer-social-btn:hover { border-color: #667eea; color: #667eea; }

/* ── Login card ───────────────────────────────────────────────────────────── */
.pub-login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.pub-login-card {
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 16px;
    padding: 44px 38px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 32px 80px rgba(0,0,0,.5);
}
.pub-login-logo-row {
    display: flex;
    align-items: center;
    gap: 9px;
    justify-content: center;
    margin-bottom: 28px;
}
.pub-login-logo-img { width: 36px; height: 36px; }
.pub-login-title {
    font-size: 1.55em;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 6px;
}
.pub-login-sub {
    font-size: .86em;
    color: #4b5280;
    text-align: center;
    margin-bottom: 26px;
}
.pub-login-secure {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    margin-bottom: 22px;
    font-size: .76em;
    color: #34d399;
    background: rgba(52,211,153,.08);
    border: 1px solid rgba(52,211,153,.18);
    border-radius: 8px;
    padding: 7px 14px;
}
.pub-login-error {
    display: none;
    background: rgba(248,113,113,.1);
    border: 1px solid rgba(248,113,113,.3);
    border-radius: 7px;
    padding: 10px 14px;
    font-size: .83em;
    color: #f87171;
    margin-bottom: 14px;
}
.pub-login-error.visible { display: block; }
.pub-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pub-field-label { font-size: .79em; font-weight: 600; color: #8a90b8; letter-spacing: .03em; }
.pub-field-input {
    padding: 11px 13px;
    background: #080c1c;
    border: 1px solid #2d3561;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: .91em;
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.pub-field-input:focus { border-color: #667eea; }
.pub-forgot {
    text-align: right;
    margin-bottom: 20px;
    font-size: .8em;
    color: #667eea;
    cursor: pointer;
}
.pub-login-submit {
    width: 100%;
    padding: 12px;
    font-size: .95em;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 18px;
    box-sizing: border-box;
    cursor: pointer;
}
.pub-divider {
    text-align: center;
    margin: 4px 0 18px;
    font-size: .79em;
    color: #3d4270;
    position: relative;
}
.pub-divider-line {
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: #1e2647;
}
.pub-divider-label {
    background: #0c1022;
    padding: 0 12px;
    position: relative;
}

.pub-signup-nudge {
    display: flex;
    justify-content: center;
    gap: 4px;
    align-items: center;
    font-size: .83em;
    color: #4b5280;
}
.pub-signup-link { color: #667eea; font-weight: 600; cursor: pointer; margin-left: 4px; }

/* ── About page specifics ─────────────────────────────────────────────────── */
.pub-about-hero {
    padding: 72px 24px 56px;
    text-align: center;
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.pub-about-h1 {
    font-size: clamp(1.8em, 4vw, 3em);
    font-weight: 900;
    color: #fff;
    margin-bottom: 18px;
    line-height: 1.15;
}
.pub-about-h1 .grad {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.pub-about-intro { font-size: 1.01em; color: #8a90b8; line-height: 1.82; }
.pub-mission-block {
    background: linear-gradient(135deg, rgba(102,126,234,.07) 0%, rgba(118,75,162,.07) 100%);
    border: 1px solid rgba(102,126,234,.18);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
}
.pub-mission-title { font-size: 1.85em; font-weight: 800; color: #fff; margin-bottom: 16px; }
.pub-mission-text  { font-size: .93em; color: #8a90b8; max-width: 660px; margin: 0 auto; line-height: 1.88; }
.pub-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.pub-value-card-icon { font-size: 1.75em; margin-bottom: 12px; }
.pub-platform-row {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    padding: 26px 0;
    border-bottom: 1px solid #1e2647;
    flex-wrap: wrap;
}
.pub-platform-icon-wrap {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(102,126,234,.1);
    border: 1px solid rgba(102,126,234,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6em; flex-shrink: 0;
}
.pub-platform-text { flex: 1; min-width: 220px; }
.pub-platform-name { font-size: 1.08em; font-weight: 800; color: #fff; margin-bottom: 8px; }
.pub-platform-desc { font-size: .87em; color: #6b7280; line-height: 1.8; }
.pub-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.pub-timeline-line {
    position: absolute;
    left: 23px; top: 12px; bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 99px;
}
.pub-timeline-item { display: flex; gap: 20px; padding: 20px 0; position: relative; z-index: 1; }
.pub-timeline-dot {
    width: 48px; height: 48px;
    border-radius: 50%; flex-shrink: 0;
    background: #0c1022;
    border: 2px solid #667eea;
    display: flex; align-items: center; justify-content: center;
    font-size: .8em; font-weight: 800; color: #667eea;
}
.pub-timeline-content { padding-top: 8px; }
.pub-timeline-title { font-size: .92em; font-weight: 700; color: #d0d0e0; margin-bottom: 6px; }
.pub-timeline-desc  { font-size: .83em; color: #6b7280; line-height: 1.65; }




#main-content { transition: grid-template-columns 0.25s ease; }
#main-content.sidebar-collapsed { grid-template-columns: 0px 1fr 300px !important; }
#main-content.rp-collapsed      { grid-template-columns: 260px 1fr 0px !important; }
#main-content.sidebar-collapsed.rp-collapsed { grid-template-columns: 0px 1fr 0px !important; }
#sidebar     { min-width: 0; overflow: hidden; }
#right-panel { min-width: 0; overflow: hidden; }



.icon {
    color: white;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pub-step-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.pub-step-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}


.chat-code-wrapper {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.chat-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-code-lang {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.chat-code-copy {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #334155;
    color: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.chat-code-copy:hover {
    background: #475569;
    border-color: rgba(255, 255, 255, 0.28);
}

.chat-code-copy:active {
    transform: translateY(1px);
}

.chat-code-wrapper pre {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
    background: #0b1220;
}

.chat-code-wrapper pre code {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}


.chat-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.chat-msg {
    box-sizing: border-box;
    display: block;
    width: 100%;
}

.chat-msg.assistant {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.chat-msg.user {
    width: fit-content;
    max-width: 33.3333%;
    margin-left: auto;
}

.chat-msg.system {
    width: 100%;
    max-width: 100%;
}

.active-job-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.active-job-url-row {
    display: flex;
    align-items: center;
}

.active-job-url,
.job-result-link {
    color: #7c8ff0;
    text-decoration: none;
    font-size: .75em;
    font-weight: 600;
}

.active-job-url:hover,
.job-result-link:hover {
    text-decoration: underline;
}


/* ── Billing / Management form table ── */
.form-table { display: flex; flex-direction: column; gap: 8px; }

.form-table-row {
    display: grid;
    grid-template-columns: 160px 1fr 90px;
    align-items: center;
    gap: 10px;
}
.form-table-row-4 {
    grid-template-columns: 160px 1fr 100px 90px;
}
.form-table-label {
    font-size: .83em; color: #8a90b8; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.form-table-field { min-width: 0; }
.form-table-amt   { min-width: 0; width: 100px; }
.form-table-btn   { width: 100%; justify-content: center; }

@media (max-width: 600px) {
    .form-table-row,
    .form-table-row-4 {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .form-table-label {
        font-size: .8em;
        color: #667eea;
    }
    .form-table-field,
    .form-table-amt {
        width: 100%;
    }
    .form-table-btn {
        width: 100%;
        padding: 10px;
    }
}

.billing-danger-heading { color: #f87171 !important; border-color: rgba(248,113,113,.25) !important; }
.billing-danger-btn { background: #dc2626 !important; }
.billing-danger-btn:hover { background: #b91c1c !important; }


.row-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.invite-meta,
.holder-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* ── Full screen loading overlay ── */
.kloe-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kloe-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

/* ── Custom confirm dialog ── */
.kloe-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kloe-confirm-box {
    background: var(--bg-2, #1e1e2e);
    border: 1px solid var(--border, #333);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.kloe-confirm-msg {
    font-size: 15px;
    color: var(--text, #e0e0e0);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.kloe-confirm-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Popup toast ── */
.kloe-popup {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: popupIn 0.2s ease;
    max-width: 480px;
}
@keyframes popupIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
.kloe-popup-error   { background: #2a1a1a; border: 1px solid #c0392b; color: #f5a49a; }
.kloe-popup-success { background: #1a2a1a; border: 1px solid #27ae60; color: #a8f0b8; }
.kloe-popup-info    { background: #1a1e2a; border: 1px solid #2980b9; color: #a8c8f0; }
.kloe-popup-close   { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; padding: 0; opacity: .7; }
.kloe-popup-msg     { flex: 1; }


/* ── Coming Soon placeholder ── */
.coming-soon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    gap: 10px;
    color: var(--text-muted, #6b7280);
}

.coming-soon-wrap .coming-soon-icon {
    font-size: 36px;
    line-height: 1;
}

.coming-soon-wrap .coming-soon-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text, #e0e0e0);
}

.coming-soon-wrap .coming-soon-sub {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
}


/*
KLOEHUB
KLOEHUB
*/


/* ── KloeHub action bar ──────────────────────────────────────────────────────── */
.hub-action-bar       { display:flex; align-items:center; gap:6px; padding:7px 12px; border-bottom:1px solid #1e2647; flex-shrink:0; }
.hub-action-btn       { background:#151a30; border:1px solid #2d3561; border-radius:6px; color:#c0c0d0; padding:4px 12px; font-size:.78em; cursor:pointer; white-space:nowrap; transition:background .12s,border-color .12s; }
.hub-action-btn:hover { background:#1e2647; border-color:#667eea; color:#fff; }

/* ── KloeHub breadcrumb ──────────────────────────────────────────────────────── */
.hub-crumb-bar                        { display:flex; align-items:center; gap:2px; padding:5px 14px; font-size:.78em; color:#4b5280; border-bottom:1px solid #111628; flex-shrink:0; }
.hub-crumb-item                       { cursor:pointer; color:#667eea; padding:1px 4px; border-radius:3px; }
.hub-crumb-item:last-child            { color:#d0d0e0; cursor:default; }
.hub-crumb-item:hover:not(:last-child){ background:#111628; }
.hub-crumb-sep                        { color:#3d4270; user-select:none; }

/* ── KloeHub list rows — 3 cols ──────────────────────────────────────────────── */
.hub-drive-list-header,
.hub-drive-list-row   { grid-template-columns: 1fr 60px 110px; }
.hub-folder-row       { cursor:default; }
.hub-folder-name-cell { cursor:pointer; }

/* ── Collapsed state ─────────────────────────────────────────────────────────── */
.hub-collapsed { display:none; }

/* ── KloeHub popup (new folder / permissions) ────────────────────────────────── */
.hub-popup-overlay { position:fixed; inset:0; background:rgba(0,0,0,.7); z-index:8000; display:flex; align-items:center; justify-content:center; }
.hub-popup-box     { background:#0c1022; border:1px solid #2d3561; border-radius:10px; padding:24px; min-width:320px; max-width:420px; width:90%; display:flex; flex-direction:column; gap:10px; }
.hub-popup-title   { font-size:.92em; font-weight:700; color:#d0d0e0; margin:0 0 4px; }
.hub-popup-share   { border-top:1px solid #1e2647; padding-top:10px; }
.hub-popup-people  { display:flex; flex-direction:column; gap:5px; max-height:160px; overflow-y:auto; }
.hub-popup-btns    { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }
.hub-perm-row      { display:flex; align-items:center; gap:8px; padding:3px 0; }
.hub-perm-email    { font-size:.82em; color:#c0c0d0; cursor:pointer; }

/* ── KloeHub context panel ───────────────────────────────────────────────────── */
.hub-ctx-search-wrap  { margin-bottom:8px; }
.hub-ctx-search       { width:100%; background:#111628; border:1px solid #1e2647; border-radius:6px; padding:5px 9px; font-size:.82em; color:#d0d0e0; outline:none; }
.hub-ctx-search:focus { border-color:#667eea; }
.hub-ctx-guide-row    { display:flex; flex-direction:column; gap:1px; padding:4px 0; border-bottom:1px solid #0d1020; }
.hub-ctx-guide-genre  { font-size:.76em; font-weight:600; color:#8a90b8; }
.hub-ctx-guide-types  { font-size:.72em; color:#4b5280; line-height:1.5; }

/* ── KloeHub drag-and-drop ───────────────────────────────────────────────────── */
.hub-dragging    { opacity: .45; }
.hub-drop-target { background: rgba(102,126,234,.12) !important; outline: 1.5px dashed #667eea; }




/* KLOE ACTIVITY */

/* ── Toolbar card ────────────────────────────────────────────────────────────  */
.activity-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 9px;
}

/* ── Control row — filter row, range+cost row ────────────────────────────────  */
.activity-control-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Filter dropdown — same token as gen-select-wrap but constrained ─────────  */
.activity-filter-wrap {
    flex: 0 0 auto;          /* never stretches */
}
.activity-filter-sel {
    width: 180px;
}

/* ── Range dropdown — compact, fixed width ───────────────────────────────────  */
.activity-range-wrap {
    flex: 0 0 auto;
}
.activity-range-sel {
    width: 148px;
}

/* ── Custom date row ─────────────────────────────────────────────────────────  */
.activity-custom-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.activity-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-date-input {
    width: 138px;
    padding: 6px 8px;
    color-scheme: dark;      /* dark native date picker */
}

/* ── Chart panel ─────────────────────────────────────────────────────────────  */
.activity-chart-panel {
    background: #0c1022;
    border: 1px solid #1e2647;
    border-radius: 9px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-chart-title {
    font-size: .76em;
    font-weight: 700;
    color: #7c8ff0;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e2647;
    flex-shrink: 0;
}

/* Fixed height so Chart.js always has a real box to fill */
.activity-chart-canvas-wrap {
    position: relative;
    height: 220px;
    width: 100%;
}

.activity-chart-loading,
.activity-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: .84em;
    color: #4b5280;
}
.activity-chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: .84em;
    color: #f87171;
}

/* ── Log section ─────────────────────────────────────────────────────────────  */
.activity-log-section {
    display: flex;
    flex-direction: column;
}

/* User email label for elevated scope views */
.activity-user-email {
    font-size: .70em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 2px;
}

/* Preview / detail text */
.activity-detail-text {
    font-size: .83em;
    color: #c0c0d0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
}

/* Inline model chip */
.activity-model-chip {
    font-size: .68em;
    margin-top: 3px;
    display: inline-block;
}

/* Spinner / loading row */
.activity-spinner {
    padding: 10px 0;
    font-size: .82em;
    color: #4b5280;
    text-align: center;
}

/* Empty / end / error feed messages */
.activity-log-empty,
.activity-log-end {
    padding: 18px 0;
    text-align: center;
    font-size: .82em;
    color: #4b5280;
}
.activity-log-error {
    padding: 18px 0;
    text-align: center;
    font-size: .82em;
    color: #f87171;
}


/* ── activity-tag base + badge colour variants ────────────────────────────────
   The base .activity-tag already exists in oxiframe.css.
   We add the border and the colour variants here.
   ─────────────────────────────────────────────────────────────────────────── */
.activity-tag {
    border: 1px solid transparent;
    border-radius: 99px;
    padding: 2px 9px;
    font-size: .71em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-chat    { background: rgba(102,126,234,.14); color: #7c8ff0;  border-color: rgba(102,126,234,.30); }
.badge-image   { background: rgba(240,147,251,.12); color: #e879f9;  border-color: rgba(240,147,251,.28); }
.badge-video   { background: rgba(79,172,254,.12);  color: #38bdf8;  border-color: rgba(79,172,254,.28);  }
.badge-audio   { background: rgba(67,233,123,.12);  color: #34d399;  border-color: rgba(67,233,123,.28);  }
.badge-music   { background: rgba(251,191,36,.10);  color: #fbbf24;  border-color: rgba(251,191,36,.25);  }
.badge-agent   { background: rgba(248,113,113,.10); color: #f87171;  border-color: rgba(248,113,113,.25); }
.badge-billing { background: rgba(52,211,153,.10);  color: #34d399;  border-color: rgba(52,211,153,.25);  }
.badge-default { background: #1e2647;               color: #8a90b8;  border-color: #2d3561;               }


/* ── KloeBot canvas additions ────────────────────────────────────────────────── */
.bot-color-wrap  { display: flex; align-items: center; gap: 10px; }
.bot-color-input { width: 44px; height: 32px; border: 1px solid #2d3561; border-radius: 6px; background: none; cursor: pointer; padding: 2px; }
.bot-color-hex   { font-size: .82em; color: #8a90b8; font-family: monospace; }
.bot-kb-list     { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.bot-kb-item     { display: flex; align-items: center; gap: 8px; background: #111628; border: 1px solid #1e2647; border-radius: 5px; padding: 5px 10px; font-size: .8em; color: #d0d0e0; }
.bot-kb-item-name{ flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-kb-remove   { background: none; border: none; color: #f87171; font-size: 1em; cursor: pointer; padding: 0 2px; flex-shrink: 0; }
.bot-kb-remove:hover { color: #fff; }
.bot-instructions-area { min-height: 100px; resize: vertical; }

/* ── KloeBot edit modal ──────────────────────────────────────────────────────── */
/* ── KloeBot Edit Modal ───────────────────────────────────────────────────────── */
.bedit-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.75);
    z-index: 8000; display: flex; align-items: center; justify-content: center;
}
.bedit-modal {
    background: #0c1022; border: 1px solid #2d3561; border-radius: 12px;
    width: 560px; max-width: 96vw; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

/* Script tag banner */
.bedit-script-banner {
    background: linear-gradient(135deg, #0f1a3a 0%, #111e47 100%);
    border-bottom: 1px solid #2d3561;
    padding: 14px 18px; flex-shrink: 0;
}
.bedit-script-label {
    font-size: .72em; font-weight: 700; color: #667eea;
    text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px;
}
.bedit-script-row {
    display: flex; align-items: center; gap: 10px;
    background: #080d1e; border: 1px solid #1e2647; border-radius: 6px;
    padding: 7px 10px;
}
.bedit-script-text {
    flex: 1; font-family: 'Courier New', monospace; font-size: .74em;
    color: #a0b0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0;
}
.bedit-copy-btn {
    background: none; border: none; cursor: pointer; padding: 2px;
    flex-shrink: 0; display: flex; align-items: center;
    opacity: .7; transition: opacity .15s;
}
.bedit-copy-btn:hover { opacity: 1; }
.bedit-copy-icon { width: 16px; height: 16px; display: block; }

/* Header */
.bedit-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 10px; flex-shrink: 0;
    border-bottom: 1px solid #111628;
}
.bedit-title {
    font-size: .95em; font-weight: 700; color: #d0d0e0; margin: 0;
}
.bedit-close {
    background: none; border: none; color: #4b5280; font-size: 1.1em;
    cursor: pointer; padding: 2px 6px; transition: color .12s;
}
.bedit-close:hover { color: #d0d0e0; }

/* Scrollable body */
.bedit-body {
    flex: 1; overflow-y: auto; padding: 16px 18px;
    display: flex; flex-direction: column; gap: 14px;
}

/* Fields */
.bedit-field       { display: flex; flex-direction: column; gap: 5px; }
.bedit-label       { font-size: .76em; font-weight: 600; color: #8a90b0; }
.bedit-input       { width: 100%; }
.bedit-textarea    { min-height: 90px; resize: vertical; width: 100%; }

/* Two-column selects */
.bedit-cols {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* Logo zone */
.bedit-logo-zone {
    width: 90px; height: 90px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; flex-shrink: 0; cursor: pointer;
}
.bedit-logo-zone img { width:100%; height:100%; object-fit:cover; border-radius:6px; }

/* KB list */
.bedit-kb-list { max-height: 120px; overflow-y: auto; margin-bottom: 6px; }
.bedit-kb-add  { font-size: .78em; padding: 8px 12px; cursor: pointer; }

/* Footer */
.bedit-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 18px; border-top: 1px solid #111628; flex-shrink: 0;
}

/* Row copy button */
.bedit-row-copy { padding: 2px 6px; }
/*2956*/

/* ═══════════════════════════════════════════════════════════════════════════
   KloeAI — Public Pages CSS
   Append this entire block to the bottom of oxiframe.css.
   Every class here is confirmed ABSENT from the existing file.
   ══════════════════════════════════════════════════════════════════════════ */

.pub-page { background: #0a0e27; }
.pub-section-alt { background:#080c1c; border-top:1px solid #1e2647; border-bottom:1px solid #1e2647; padding:72px 32px; flex-shrink:0; }
.pub-section-alt .pub-section-inner { max-width:1100px; margin:0 auto; }

/* feature check prefix */
.pub-feature-item::before { content:'✓'; color:#667eea; font-weight:800; font-size:.85em; flex-shrink:0; width:14px; }
.pub-feature-item.dim::before { color:#2d3561; }
.pub-feature-item.dim { color:#3d4270; }

/* stat strip */
.pub-stats-row { display:flex; gap:0; flex-wrap:wrap; border:1px solid #1e2647; border-radius:14px; overflow:hidden; margin-top:48px; background:#0c1022; }
.pub-stat { flex:1; min-width:160px; padding:28px 24px; border-right:1px solid #1e2647; display:flex; flex-direction:column; gap:5px; }
.pub-stat:last-child { border-right:none; }
.pub-stat-value { font-size:1.9em; font-weight:900; color:#fff; line-height:1; background:linear-gradient(135deg,#667eea,#764ba2); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.pub-stat-label { font-size:.8em; color:#6b7280; line-height:1.45; }




/* capability cards */
.pub-cap-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:16px;
    margin-top:8px;
    align-items:stretch;
}

.pub-cap-card {
    background:#0c1022;
    border:1px solid #1e2647;
    border-radius:14px;
    padding:26px 24px;
    display:flex;
    flex-direction:column;
    gap:12px;
    cursor:pointer;
    transition:border-color .2s,box-shadow .2s,background .2s;
    position:relative;
    overflow:hidden;
    height:100%;
}

.pub-cap-card::after {
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(135deg,rgba(102,126,234,.04),transparent 60%);
    pointer-events:none;
    opacity:0;
    transition:opacity .2s;
}

.pub-cap-card:hover {
    border-color:rgba(102,126,234,.45);
    box-shadow:0 8px 32px rgba(102,126,234,.08);
    background:#0d1228;
}

.pub-cap-card:hover::after {
    opacity:1;
}


.pub-cap-icon-wrap {
    width:48px;
    height:48px;
    border-radius:12px;
    background:rgba(102,126,234,.1);
    border:1px solid rgba(102,126,234,.2);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.4em;
    flex-shrink:0;
}

.pub-cap-tag {
    font-size:.7em;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#667eea;
}

.pub-cap-name {
    font-size:1.05em;
    font-weight:800;
    color:#fff;
    margin-bottom:2px;
}

.pub-cap-desc {
    font-size:.84em;
    color:#6b7280;
    line-height:1.65;
    margin:0;
}

@media (min-width: 900px) {
    .pub-cap-desc {
        min-height: 10.3em;
    }
}

.pub-cap-features {
    display:flex;
    flex-direction:column;
    gap:6px;
    border-top:1px solid #1e2647;
    padding-top:12px;
    margin-top:2px;
    flex:1;
}

.pub-cap-features .pub-feature-item {
    font-size:.79em;
    color:#8a90b8;
}

.pub-cap-link {
    font-size:.8em;
    font-weight:700;
    color:#667eea;
    cursor:pointer;
    margin-top:auto;
    transition:color .13s;
}

.pub-cap-link:hover {
    color:#8ca0f5;
}

/* plan cards */
.pub-plan-grid { 
    display:grid; 
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); 
    gap:22px; 
    align-items:stretch; 
}
.pub-plan-card { background:#0c1022; border:1px solid #1e2647; border-radius:16px; padding:32px 28px; display:flex; flex-direction:column; gap:18px; transition:border-color .2s,box-shadow .2s; position:relative; overflow:hidden; }
.pub-plan-card:hover { border-color:#2d3561; box-shadow:0 12px 40px rgba(0,0,0,.35); }
.pub-plan-card.featured { border-color:rgba(102,126,234,.5); box-shadow:0 0 0 1px rgba(102,126,234,.2),0 20px 60px rgba(102,126,234,.1); background:linear-gradient(160deg,#0d1228 0%,#0c1022 100%); padding-top:44px; }
.pub-plan-card.featured::before { content:'Most popular for teams'; position:absolute; top:0; left:0; right:0; background:linear-gradient(90deg,#667eea,#764ba2); color:#fff; font-size:.72em; font-weight:700; letter-spacing:.08em; text-transform:uppercase; text-align:center; padding:6px 0; }
.pub-plan-header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pub-plan-name { font-size:1.18em; font-weight:800; color:#fff; }
.pub-plan-badge { font-size:.72em; font-weight:700; letter-spacing:.06em; padding:3px 10px; border-radius:99px; white-space:nowrap; }
.pub-plan-badge.blue  { background:rgba(102,126,234,.15); color:#7c8ff0; border:1px solid rgba(102,126,234,.25); }
.pub-plan-badge.green { background:rgba(52,211,153,.1);   color:#34d399; border:1px solid rgba(52,211,153,.2); }
.pub-plan-badge.muted { background:#151a30; color:#4b5280; border:1px solid #1e2647; }
.pub-price-row { display:flex; align-items:baseline; gap:5px; }
.pub-price-amount { font-size:3em; font-weight:900; color:#fff; line-height:1; letter-spacing:-.02em; }
.pub-price-period { font-size:.84em; color:#4b5280; font-weight:500; }
.pub-plan-desc { 
    font-size:.86em; 
    color:#6b7280; 
    line-height:1.7; 
    padding-bottom:4px; 
    border-bottom:1px solid #1e2647;
    margin:0;
}
@media (min-width: 900px) {
    .pub-plan-desc {
        min-height:4.8em;
    }
}
.pub-plan-features { display:flex; flex-direction:column; gap:9px; flex:1; }
.pub-plan-features .pub-feature-item { font-size:.84em; color:#c0c0d0; }
.pub-plan-cta { display:block; width:100%; padding:13px 0; border-radius:10px; font-size:.88em; font-weight:700; text-align:center; cursor:pointer; border:1.5px solid #2d3561; color:#c0c0d0; background:#151a30; transition:border-color .18s,color .18s,background .18s; margin-top:auto; letter-spacing:.02em; font-family:inherit; }
.pub-plan-cta:hover { border-color:#667eea; color:#fff; background:#1a2040; }
.pub-plan-cta.primary { background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; border-color:transparent; }
.pub-plan-cta.primary:hover { opacity:.88; }
.pub-pricing-chip-row {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    margin-bottom:12px;
}

.pub-pricing-chip-row .pub-chip,
.pub-pricing-chip-row .btn-outline {
    width:220px;
    box-sizing:border-box;
    margin:0;
    text-align: center;
    display:flex;
    justify-content:center;
    align-items:center;
}



/* faq */
.pub-faq-list { display:flex; flex-direction:column; gap:0; border:1px solid #1e2647; border-radius:14px; overflow:hidden; margin-top:8px; }
.pub-faq-item { border-bottom:1px solid #1e2647; }
.pub-faq-item:last-child { border-bottom:none; }
.pub-faq-q { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; cursor:pointer; font-size:.9em; font-weight:700; color:#d0d0e0; user-select:none; transition:background .13s; background:#0c1022; }
.pub-faq-q:hover { background:#0d1228; }
.pub-faq-arrow { color:#4b5280; font-size:1em; transition:transform .2s; flex-shrink:0; }
.pub-faq-item.open .pub-faq-arrow { transform:rotate(180deg); }
.pub-faq-a { max-height:0; overflow:hidden; transition:max-height .28s ease,padding .2s ease; font-size:.86em; color:#6b7280; line-height:1.78; padding:0 24px; background:#080c1c; }
.pub-faq-item.open .pub-faq-a { max-height:300px; padding:16px 24px 20px; }

/* table wrapper */
.pub-table-wrap { overflow-x:auto; border-radius:12px; border:1px solid #1e2647; background:#0c1022; margin-top:24px; }
.pub-table-wrap table { width:100%; border-collapse:collapse; font-size:.84em; color:#c0c0d0; }
.pub-table-wrap th { background:#0c1022; color:#4b5280; font-size:.72em; font-weight:700; letter-spacing:.1em; text-transform:uppercase; padding:13px 18px; text-align:left; border-bottom:1px solid #1e2647; white-space:nowrap; }
.pub-table-wrap td { padding:12px 18px; border-bottom:1px solid #10162e; vertical-align:top; line-height:1.55; color:#c0c0d0; }
.pub-table-wrap tr:last-child td { border-bottom:none; }
.pub-table-wrap tr:hover td { background:rgba(102,126,234,.03); }
.pub-table-wrap td code { font-family:'SF Mono','Fira Code',monospace; font-size:.88em; color:#667eea; background:rgba(102,126,234,.08); padding:1px 6px; border-radius:4px; }
.pub-table-wrap .td-muted { color:#4b5280; }
.pub-table-wrap .td-green { color:#34d399; }
.pub-table-wrap .td-blue  { color:#7c8ff0; }

/* hub genre list */
.pub-hub-genre-list { display:flex; flex-direction:column; gap:0; border:1px solid #1e2647; border-radius:14px; overflow:hidden; margin-top:8px; }
.pub-hub-genre-row { display:flex; align-items:flex-start; gap:20px; padding:26px 28px; border-bottom:1px solid #1e2647; transition:background .15s; }
.pub-hub-genre-row:last-child { border-bottom:none; }
.pub-hub-genre-row:hover { background:#0c1022; }
.pub-hub-genre-icon { width:44px; height:44px; border-radius:10px; background:rgba(102,126,234,.1); border:1px solid rgba(102,126,234,.18); display:flex; align-items:center; justify-content:center; font-size:1.35em; flex-shrink:0; margin-top:2px; }
.pub-hub-genre-body { flex:1; min-width:0; }
.pub-hub-genre-name  { font-size:1em; font-weight:800; color:#fff; margin-bottom:4px; }
.pub-hub-genre-types { font-size:.76em; font-weight:600; color:#667eea; letter-spacing:.03em; margin-bottom:8px; }
.pub-hub-genre-desc  { font-size:.84em; color:#6b7280; line-height:1.65; }

/* kloebot deploy steps */
.pub-deploy-steps { display:flex; flex-direction:column; gap:0; margin-top:12px; }
.pub-deploy-step { display:flex; gap:20px; padding:24px 0; border-bottom:1px solid #1e2647; }
.pub-deploy-step:last-child { border-bottom:none; }
.pub-deploy-num { width:40px; height:40px; border-radius:50%; background:rgba(102,126,234,.1); border:1.5px solid rgba(102,126,234,.35); display:flex; align-items:center; justify-content:center; font-size:.88em; font-weight:800; color:#667eea; flex-shrink:0; margin-top:2px; }
.pub-deploy-body { flex:1; }
.pub-deploy-title { font-size:.97em; font-weight:800; color:#fff; margin-bottom:6px; }
.pub-deploy-desc  { font-size:.84em; color:#6b7280; line-height:1.7; }

/* code block */
.pub-code-block { background:#080c1c; border:1px solid #1e2647; border-radius:10px; padding:18px 22px; font-family:'SF Mono','Fira Code','Consolas',monospace; font-size:.82em; color:#8ca0f5; line-height:1.7; overflow-x:auto; margin-top:10px; white-space:pre; }
.pub-code-block .code-tag  { color:#667eea; }
.pub-code-block .code-attr { color:#7c8ff0; }
.pub-code-block .code-val  { color:#34d399; }

/* bot feature grid */
.pub-bot-feat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; margin-top:8px; }
.pub-bot-feat-card { background:#0c1022; border:1px solid #1e2647; border-radius:12px; padding:20px 18px; display:flex; flex-direction:column; gap:8px; transition:border-color .15s; }
.pub-bot-feat-card:hover { border-color:#2d3561; }
.pub-bot-feat-icon  { font-size:1.4em; margin-bottom:2px; }
.pub-bot-feat-title { font-size:.9em; font-weight:700; color:#d0d0e0; }
.pub-bot-feat-desc  { font-size:.81em; color:#6b7280; line-height:1.6; }

/* api goal cards */
.pub-api-goals-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; margin-top:8px; }
.pub-api-goal-card { background:#0c1022; border:1px solid #1e2647; border-radius:12px; padding:18px 16px; display:flex; flex-direction:column; gap:6px; transition:border-color .15s,background .15s; }
.pub-api-goal-card:hover { border-color:rgba(102,126,234,.35); background:#0d1228; }
.pub-api-goal-icon { font-size:1.5em; }
.pub-api-goal-name { font-size:.88em; font-weight:700; color:#d0d0e0; }
.pub-api-goal-key  { font-family:'SF Mono','Fira Code',monospace; font-size:.73em; color:#667eea; background:rgba(102,126,234,.08); border:1px solid rgba(102,126,234,.15); border-radius:5px; padding:2px 7px; width:fit-content; }

/* auth card */
.pub-auth-card { background:#080c1c; border:1px solid #1e2647; border-radius:14px; overflow:hidden; margin-top:8px; }
.pub-auth-card-header { display:flex; align-items:center; gap:12px; padding:14px 20px; border-bottom:1px solid #1e2647; background:#0c1022; }
.pub-auth-method   { font-family:'SF Mono','Fira Code',monospace; font-size:.78em; font-weight:700; color:#34d399; background:rgba(52,211,153,.08); border:1px solid rgba(52,211,153,.2); border-radius:6px; padding:3px 10px; }
.pub-auth-endpoint { font-family:'SF Mono','Fira Code',monospace; font-size:.82em; color:#8ca0f5; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pub-auth-card-body { padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.pub-auth-row { display:flex; align-items:flex-start; gap:14px; font-size:.83em; }
.pub-auth-row-key { font-family:'SF Mono','Fira Code',monospace; color:#7c8ff0; min-width:120px; flex-shrink:0; padding-top:1px; }
.pub-auth-row-val { color:#6b7280; line-height:1.55; }
.pub-auth-row-val code { font-family:'SF Mono','Fira Code',monospace; color:#34d399; background:rgba(52,211,153,.07); padding:1px 6px; border-radius:4px; font-size:.92em; }

/* doc examples */
.pub-doc-example { background:#080c1c; border:1px solid #1e2647; border-radius:12px; overflow:hidden; margin-top:20px; }
.pub-doc-example-header { display:flex; align-items:center; justify-content:space-between; padding:11px 18px; background:#0c1022; border-bottom:1px solid #1e2647; }
.pub-doc-example-title { font-size:.78em; font-weight:700; color:#8a90b8; letter-spacing:.05em; }
.pub-doc-example-lang  { font-size:.7em; font-weight:600; color:#4b5280; background:#151a30; border:1px solid #1e2647; border-radius:5px; padding:2px 8px; }
.pub-doc-example-body  { padding:18px 20px; font-family:'SF Mono','Fira Code','Consolas',monospace; font-size:.81em; color:#8ca0f5; line-height:1.8; overflow-x:auto; white-space:pre; }
.pub-doc-h3 { font-size:1.08em; font-weight:800; color:#fff; margin-bottom:8px; margin-top:36px; padding-bottom:8px; border-bottom:1px solid #1e2647; }
.pub-doc-p  { font-size:.88em; color:#6b7280; line-height:1.8; margin-bottom:10px; }

/* about value cards */
.pub-value-card { background:#0c1022; border:1px solid #1e2647; border-radius:14px; padding:28px 24px; display:flex; flex-direction:column; gap:10px; transition:border-color .15s; }
.pub-value-card:hover { border-color:#2d3561; }
.pub-value-card-title { font-size:.97em; font-weight:800; color:#fff; }
.pub-value-card-desc  { font-size:.84em; color:#6b7280; line-height:1.7; }

/* org callout */
.pub-org-callout { background:linear-gradient(135deg,rgba(102,126,234,.07),rgba(118,75,162,.07)); border:1px solid rgba(102,126,234,.2); border-radius:16px; padding:40px 36px; display:flex; gap:32px; flex-wrap:wrap; align-items:flex-start; margin-top:8px; }
.pub-org-callout-text  { flex:1; min-width:220px; }
.pub-org-callout-title { font-size:1.12em; font-weight:800; color:#fff; margin-bottom:10px; }
.pub-org-callout-desc  { font-size:.87em; color:#6b7280; line-height:1.78; }
.pub-org-callout-list  { flex:1; min-width:220px; display:flex; flex-direction:column; gap:8px; }
.pub-org-callout-item  { display:flex; align-items:flex-start; gap:10px; font-size:.85em; color:#c0c0d0; }
.pub-org-callout-item::before { content:'→'; color:#667eea; font-weight:700; flex-shrink:0; margin-top:1px; }

/* legal */
.pub-legal-wrap { max-width:780px; margin:0 auto; padding:64px 32px 80px; display:flex; flex-direction:column; gap:40px; }
.pub-legal-hero { border-bottom:1px solid #1e2647; padding-bottom:32px; }
.pub-legal-eyebrow { font-size:.73em; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:#667eea; margin-bottom:10px; display:block; }
.pub-legal-h1 { font-size:clamp(1.6em,3vw,2.4em); font-weight:900; color:#fff; margin-bottom:10px; line-height:1.15; }
.pub-legal-date { font-size:.8em; color:#4b5280; margin-top:8px; }
.pub-legal-section { display:flex; flex-direction:column; gap:10px; }
.pub-legal-section-title { font-size:1em; font-weight:800; color:#d0d0e0; padding-bottom:8px; border-bottom:1px solid #1e2647; }
.pub-legal-body { font-size:.87em; color:#6b7280; line-height:1.9; }
.pub-legal-body strong { color:#c0c0d0; font-weight:700; }
.pub-legal-body a { color:#667eea; text-decoration:none; cursor:pointer; }
.pub-legal-body a:hover { text-decoration:underline; }
.pub-legal-body ul { margin:8px 0 8px 18px; display:flex; flex-direction:column; gap:5px; }
.pub-legal-body ul li { list-style:disc; }

/* helpers */
.pub-inline-icon  { display:inline-flex; align-items:center; vertical-align:middle; margin-right:6px; opacity:.8; font-size:.95em; }
.pub-pill-icon    { display:inline-flex; align-items:center; font-size:.9em; flex-shrink:0; margin-right:3px; }
.pub-footer-social-icon { width:15px; height:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.pub-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 13px; background:rgba(52,211,153,.07); border:1px solid rgba(52,211,153,.18); border-radius:99px; font-size:.78em; font-weight:600; color:#34d399; width:fit-content; margin-bottom:18px; }
.pub-signin-nudge { display:flex; align-items:center; justify-content:center; gap:8px; padding:14px 20px; background:#0c1022; border:1px dashed #2d3561; border-radius:10px; font-size:.84em; color:#4b5280; margin-top:8px; }
.pub-signin-nudge a { color:#667eea; font-weight:600; cursor:pointer; text-decoration:none; }
.pub-signin-nudge a:hover { text-decoration:underline; }
.pub-limit-row  { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.pub-limit-pill { padding:6px 14px; background:#0c1022; border:1px solid #1e2647; border-radius:8px; font-size:.8em; color:#8a90b8; display:flex; flex-direction:column; gap:2px; min-width:120px; }
.pub-limit-pill strong { font-size:1.15em; color:#fff; font-weight:800; }
.pub-text-divider { display:flex; align-items:center; gap:14px; font-size:.75em; color:#3d4270; margin:32px 0 4px; }
.pub-text-divider::before,.pub-text-divider::after { content:''; flex:1; height:1px; background:#1e2647; }

/* responsive */
@media (max-width:900px) {
    .pub-plan-grid      { grid-template-columns:1fr; }
    .pub-cap-grid       { grid-template-columns:1fr; }
    .pub-hub-genre-row  { flex-direction:column; gap:12px; }
    .pub-org-callout    { flex-direction:column; }
    .pub-stats-row      { flex-direction:column; }
    .pub-stat           { border-right:none; border-bottom:1px solid #1e2647; }
    .pub-stat:last-child { border-bottom:none; }
    .pub-legal-wrap     { padding:40px 20px 60px; }
    .pub-api-goals-grid { grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); }
    .pub-section-alt    { padding:48px 20px; }
}
@media (max-width:600px) {
    .pub-plan-card              { padding:24px 18px; }
    .pub-plan-card.featured     { padding-top:40px; }
    .pub-org-callout            { padding:26px 20px; }
    .pub-legal-wrap             { padding:28px 16px 48px; gap:28px; }
    .pub-bot-feat-grid          { grid-template-columns:1fr; }
    .pub-hub-genre-row          { padding:20px 18px; }
    .pub-faq-q                  { padding:16px 18px; }
    .pub-faq-item.open .pub-faq-a { padding:14px 18px 18px; }
    .pub-table-wrap th,.pub-table-wrap td { padding:10px 12px; }
    .pub-price-amount           { font-size:2.4em; }
}



.pub-api-doc-goals {
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:18px;
}

.pub-doc-goal {
    border:1px solid #1e2647;
    border-radius:14px;
    overflow:hidden;
    background:#0c1022;
}

.pub-doc-goal-header {
    padding:16px 18px;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:12px;
}

.pub-doc-goal-text {
    display:flex;
    flex-direction:column;
    gap:4px;
    flex:1;
    min-width:0;
}

.pub-doc-goal-title {
    font-size:1em;
    font-weight:800;
    color:#fff;
}

.pub-doc-goal-sub {
    font-size:.84em;
    color:#6b7280;
}

.pub-doc-goal-arrow {
    color:#8a90b8;
    font-size:1em;
    flex-shrink:0;
    line-height:1;
}

.pub-doc-goal-body {
    border-top:1px solid #1e2647;
    padding:16px 18px 18px;
}

.pub-doc-code-tabs {
    display:flex;
    gap:8px;
    margin-bottom:12px;
}

.pub-doc-code-tabs .btn-outline.active {
    border-color:#667eea;
    color:#fff;
    background:#1a2040;
}

.pub-doc-code-wrap {
    position:relative;
}

.pub-doc-code-wrap pre {
    margin:0;
    background:#0a0e1d;
    border:1px solid #1e2647;
    border-radius:12px;
    padding:16px;
    overflow:auto;
    font-size:.82em;
    line-height:1.7;
}

.pub-doc-code-wrap code {
    font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pub-code-copy {
    position:absolute;
    top:10px;
    right:10px;
    font-size:.72em;
    padding:5px 10px;
    border-radius:8px;
    border:1px solid #2d3561;
    background:#151a30;
    color:#c0c0d0;
    cursor:pointer;
    line-height:1;
}

.pub-code-copy:hover {
    border-color:#667eea;
    color:#fff;
    background:#1a2040;
}

.doc-wrap {
    max-width: 560px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLET ADDITIONS
   All rules are additive. Nothing above is touched.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px): collapse right panel into a drawer ─────────────── */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 260px 1fr;
    }

    /* Right panel becomes a slide-in drawer */
    .right-panel {
        position: fixed;
        top: 60px;
        right: 0;
        bottom: 48px;
        width: 300px;
        z-index: 200;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: -8px 0 32px rgba(0,0,0,.5);
    }
    .right-panel.open {
        transform: translateX(0);
    }

    /* Overlay behind the drawer */
    .rp-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 199;
        background: rgba(0,0,0,.45);
    }
    .rp-overlay.active { display: block; }
}

/* ── Mobile (≤ 768px): full slide-in sidebars ───────────────────────────── */
@media (max-width: 768px) {
    body:has(.workspace) { overflow: hidden; }

    .workspace {
        grid-template-rows: 56px 1fr 44px;
    }

    .main-content {
        grid-template-columns: 1fr;
        position: relative;
    }

    /* Left sidebar → off-canvas drawer */
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 44px;
        width: 280px;
        z-index: 300;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 8px 0 32px rgba(0,0,0,.5);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* Overlay behind left sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 299;
        background: rgba(0,0,0,.5);
    }
    .sidebar-overlay.active { display: block; }

    /* Right panel: also full off-canvas from the right */
    .right-panel {
        top: 56px;
        bottom: 44px;
        width: min(300px, 90vw);
    }

    /* Canvas takes the full width */
    .canvas-area {
        width: 100%;
    }

    /* Top bar: tighter padding on mobile */
    .top-bar {
        padding: 0 12px;
        gap: 8px;
    }

    /* Bottom bar: allow wrapping/scrolling on small screens */
    .bottom-bar {
        padding: 0 12px;
        gap: 10px;
        overflow-x: auto;
        font-size: .75em;
    }

    /* Canvas body: less padding */
    .canvas-body {
        padding: 14px;
    }

    /* Canvas header: allow title to truncate */
    .canvas-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 50vw;
    }

    /* Chat: full-width messages on mobile */
    .chat-msg {
        max-width: 88%;
    }

    .chat-main {
        height: calc(100vh - 56px - 44px - 48px - 44px);
    }

    /* Gen/editor wraps: remove the centering max-width constraint */
    .gen-wrap,
    .bot-builder-wrap,
    .activity-wrap,
    .hub-drive-wrap,
    .editor-wrap,
    .doc-wrap {
        max-width: 100%;
        padding: 0 2px;
    }

    /* Gen options row: wrap on very small screens */
    .gen-options-row {
        flex-wrap: wrap;
    }
    .gen-select-wrap {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    /* Chat options: allow wrapping */
    .chat-options-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Editor height: account for smaller top/bottom bars */
    .editor-wrap {
        height: calc(100vh - 56px - 44px - 48px);
    }

    /* Modals: nearly full-screen on mobile */
    .modal-content {
        padding: 18px 16px;
        width: min(98vw, 700px);
        max-height: 92vh;
    }
    .modal-fullscreen {
        width: 98vw;
        height: 92vh;
        max-width: 98vw;
    }

    /* Hub drive list: hide less important columns */
    .hub-drive-list-header,
    .hub-drive-list-row {
        grid-template-columns: 1fr 70px 60px;
    }
    .hub-drive-col-status { display: none; }

    /* Config label: shorter minimum on mobile */
    .config-label {
        min-width: 100px;
        font-size: .8em;
    }

    /* Picker grid: 3 columns on mobile */
    .picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    /* Hub grid: 2 columns minimum */
    .hub-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    /* Public page sections: already have 900px/600px breakpoints above,
       just tighten padding a little more */
    .pub-section-alt { padding: 36px 14px; }
    .pub-legal-wrap  { padding: 24px 14px 40px; gap: 24px; }
}

/* ── Small phones (≤ 420px) ─────────────────────────────────────────────── */
@media (max-width: 420px) {
    .logo-text { font-size: 1.1em; }

    .chat-msg { max-width: 94%; font-size: .84em; }

    .gen-select-wrap { flex: 1 1 100%; }

    .hub-drive-list-header,
    .hub-drive-list-row {
        grid-template-columns: 1fr 60px;
    }
    .hub-drive-col-type { display: none; }

    .modal-content { padding: 14px 12px; }

    .canvas-body { padding: 10px; }

    .bottom-bar .bb-sep { display: none; }

    /* Stack config items vertically */
    .config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .config-label { min-width: unset; }
    .config-select-wrap { width: 100%; }
}


/* ── Footer responsive fixes ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pub-footer {
        padding: 36px 20px 20px;
    }

    .pub-footer-top {
        flex-direction: column;
        gap: 28px;
        margin-bottom: 24px;
    }

    /* Brand block: full width, desc no longer capped */
    .pub-footer-brand {
        flex: unset;
        width: 100%;
    }
    .pub-footer-brand-desc {
        max-width: 100%;
    }

    /* Link columns: 2-up grid */
    .pub-footer-col {
        flex: unset;
    }

    /* Put all columns in a 2-column grid */
    .pub-footer-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Brand stays full width, columns flow into a 2-col sub-grid */
    .pub-footer-brand {
        grid-column: 1 / -1;
    }

    .pub-footer-cols-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px 16px;
    }

    /* If .pub-footer-cols-grid doesn't exist in markup, fall back:
       treat direct .pub-footer-col children as 2-col grid */
    .pub-footer-top .pub-footer-col {
        min-width: 0;
    }

    /* Bottom bar: stack copyright above socials, both centered */
    .pub-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding-top: 16px;
    }

    .pub-footer-socials {
        justify-content: center;
    }

    /* Slightly larger tap targets for social buttons */
    .pub-footer-social-btn {
        width: 36px;
        height: 36px;
        font-size: .95em;
    }

    /* bedit-footer: stack buttons on small screens */
    .bedit-footer {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px 14px;
    }
}

@media (max-width: 420px) {
    .pub-footer {
        padding: 28px 14px 16px;
    }

    /* Single column on very small phones */
    .pub-footer-cols-grid {
        grid-template-columns: 1fr;
    }

    .pub-footer-top .pub-footer-col {
        border-top: 1px solid #1e2647;
        padding-top: 18px;
    }

    .pub-footer-col-title {
        margin-bottom: 10px;
    }

    .pub-footer-link {
        margin-bottom: 10px;
        font-size: .87em;
    }
}


/* ── Mobile overflow fix — prevents anything from exceeding viewport width ── */
@media (max-width: 480px) {

    /* Hard stop: nothing escapes the viewport */
    html {
        max-width: 100vw;
        overflow-x: hidden;
    }
    body:not(:has(.workspace)) {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Workspace + main content must not exceed screen */
    .workspace,
    .main-content,
    .canvas-area,
    .canvas-body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Top bar: tighter, no overflow */
    .top-bar {
        padding: 0 10px;
        gap: 6px;
        max-width: 100vw;
    }

    /* Shrink logo text so it doesn't push nav buttons off screen */
    .logo-text {
        font-size: 1em;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Bottom bar scrolls internally, never expands the page */
    .bottom-bar {
        max-width: 100vw;
        overflow-x: auto;
        padding: 0 10px;
        gap: 8px;
    }

    /* ── Public page sections ── */
    .pub-footer,
    .pub-section-alt,
    [class*="pub-"] {
        max-width: 100vw;
        box-sizing: border-box;
    }

    .pub-footer {
        padding: 28px 14px 16px;
    }

    /* Kill min-widths that blow out flex rows */
    .pub-footer-brand,
    .pub-footer-col,
    .pub-hub-text,
    .pub-hub-visual,
    .pub-platform-text,
    .pub-org-callout-text,
    .pub-org-callout-list {
        min-width: 0;
        width: 100%;
        flex: unset;
    }

    /* Footer top: single column, no gaps that cause overflow */
    .pub-footer-top {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }

    /* Footer columns: 2-col grid, tighter */
    .pub-footer-col {
        width: auto;
    }
    .pub-footer-top .pub-footer-col ~ .pub-footer-col {
        border-top: 1px solid #1e2647;
        padding-top: 16px;
    }

    /* Footer bottom: stack and center */
    .pub-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    /* Hub/platform rows that have large min-widths */
    .pub-hub-row,
    .pub-platform-row {
        flex-direction: column;
        gap: 16px;
    }

    /* Org callout */
    .pub-org-callout {
        flex-direction: column;
        padding: 20px 14px;
        gap: 16px;
    }

    /* Stats row */
    .pub-stats-row {
        flex-direction: column;
    }
    .pub-stat {
        border-right: none;
        border-bottom: 1px solid #1e2647;
        min-width: 0;
        width: 100%;
    }
    .pub-stat:last-child { border-bottom: none; }

    /* Plan/cap grids: single column */
    .pub-plan-grid,
    .pub-cap-grid,
    .pub-bot-feat-grid {
        grid-template-columns: 1fr;
    }

    /* Auth row key label: allow wrapping so long monospace labels don't overflow */
    .pub-auth-row {
        flex-direction: column;
        gap: 4px;
    }
    .pub-auth-row-key {
        min-width: 0;
    }

    /* Limit pills: allow shrinking */
    .pub-limit-row {
        flex-wrap: wrap;
    }
    .pub-limit-pill {
        min-width: 0;
        flex: 1 1 calc(50% - 5px);
    }

    /* Navbar: ensure icon buttons don't push layout wide */
    .top-bar-right {
        gap: 4px;
        flex-shrink: 0;
    }
    .icon-btn {
        width: 30px;
        height: 30px;
        font-size: .9em;
    }

    /* Modals */
    .modal {
        padding: 10px;
    }
    .modal-content {
        width: 100%;
        max-width: calc(100vw - 20px);
        padding: 14px 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXTRACTED FROM JS — all inline styles moved to CSS classes
   Replace element.style / style="" attributes in JS with these classes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Nav drawer divider & sign-in button (buildPubNavBar) ────────────────── */
.pub-nav-divider {
    margin: 10px 8px;
    border-top: 1px solid #1e2647;
}

.pub-nav-signin-btn {
    margin: 6px 8px;
    width: calc(100% - 16px);
}

/* ── Dashboard top-bar brand (buildDashboardShell) ───────────────────────── */
.top-bar-brand-link {
    cursor: pointer;
}

/* ── Mobile overlay (style.display toggled in JS → use class instead) ────── */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 60px 0 48px 0;
    z-index: 210;
    background: rgba(0,0,0,.55);
    pointer-events: auto;
}
.mobile-overlay.visible {
    display: block;
}
/* Shrink overlay rightward so it never covers the right panel */
.mobile-overlay.rp-open {
    right: min(300px, 90vw);
}

/* ── Image ref previews (image/video upload zones) ───────────────────────── */
.ref-preview-img {
    max-height: 120px;
    max-width: 100%;
    border-radius: 6px;
}

.bot-logo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-logo-preview-img-rounded {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* ── Editor placed assets (commented-out editor, kept for future use) ────── */
.editor-placed-img,
.editor-placed-vid {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
}

/* ── API key copy button states ──────────────────────────────────────────── */
.api-copy-btn {
    background: linear-gradient(180deg, #2b7cff 0%, #1f66e5 100%);
    box-shadow: 0 4px 14px rgba(31,102,229,0.24);
    transition: transform .1s ease, box-shadow .1s ease, background .2s ease;
}
.api-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31,102,229,0.30);
}
.api-copy-btn.copied {
    background: linear-gradient(180deg, #1f9d57 0%, #157347 100%);
    box-shadow: 0 4px 14px rgba(21,115,71,0.28);
}

.api-copy-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    display: block;
}

/* Hide-key button */
.api-hide-btn {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
    transition: background .13s, border-color .13s, transform .1s;
}
.api-hide-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

/* ── Transcript viewer (buildTranscriptViewer) ───────────────────────────── */
.transcript-body {
    padding: 16px;
}

.transcript-back-btn {
    margin-bottom: 12px;
}

.transcript-new-body {
    padding: 16px;
    min-height: 300px;
}

.transcript-translate-btn {
    margin-bottom: 12px;
    margin-left: 8px;
}

.transcript-pre {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    color: #d0d2d8;
}

.transcript-chat-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}

.transcript-bubble {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 80%;
}
.transcript-bubble.user {
    background: #667eea;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.transcript-bubble.assistant {
    background: #151a30;
    color: #d8d8e8;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.transcript-role-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.5;
}

.transcript-text {
    font-size: 13px;
    line-height: 1.6;
    color: #d0d2d8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── API doc sections (buildAPIDocumentation) ────────────────────────────── */
.doc-note {
    margin: 0 18px 12px;
    font-size: 12px;
    color: #777;
}

.doc-note-margin {
    margin: 0 18px 10px;
    font-size: 12px;
    color: #777;
    line-height: 1.6;
}

.doc-section-label {
    margin: 16px 18px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.doc-table-wrap {
    margin: 0 18px 18px;
    overflow-x: auto;
}

.doc-evt-table-wrap {
    margin: 0 18px 18px;
}

/* WebSocket event reference table */
.doc-ws-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.doc-ws-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.doc-ws-table th {
    padding: 6px 8px;
    text-align: left;
    color: #555;
    font-weight: 700;
    font-size: 11px;
}
.doc-ws-table td {
    padding: 6px 8px;
    font-size: 11px;
}
.doc-ws-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.doc-ws-dir-in  { color: #6aacff; font-family: monospace; font-weight: 600; }
.doc-ws-dir-out { color: #f87171; font-family: monospace; font-weight: 600; }
.doc-ws-evt     { color: #d8dae2; font-family: monospace; }
.doc-ws-desc    { color: #888; }

/* Model table cells */
.doc-model-price { font-size: 11px; color: #888; }

/* ── API meta rows (doc-meta-row) ────────────────────────────────────────── */
.doc-meta-row-col {
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.doc-meta-key {
    display: inline-block;
    width: 110px;
}

/* ── Inline code snippets (used in innerHTML strings) ────────────────────── */
.inline-code {
    background: rgba(255,255,255,0.06);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Hub upload controls (always hidden until triggered) ─────────────────── */
.hub-hidden-input {
    display: none;
}

/* ── Row/item cursor ─────────────────────────────────────────────────────── */
.clickable {
    cursor: pointer;
}

/* ── Toggle row in API docs ──────────────────────────────────────────────── */
.doc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* ── Full-width bottom button ────────────────────────────────────────────── */
.btn-full-width {
    width: 100%;
    margin-top: 4px;
}

/* ── Guide arrow (rotated when open) ────────────────────────────────────── */
.guide-arrow-open {
    transform: rotate(90deg);
}

/* ── API doc tips panel ──────────────────────────────────────────────────── */
.doc-tips-wrap {
    display: flex;
    flex-direction: column;
    gap: 9px;
    line-height: 1.65;
    font-size: 12px;
}

/* ── Pricing/doc content wrap ────────────────────────────────────────────── */
.doc-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Upload zone hint text ───────────────────────────────────────────────── */
.upload-zone-hint {
    font-size: .78em;
    color: #4b5280;
}

/* ── Error element visibility (replaces style.display block/none) ────────── */
.error-msg {
    display: none;
    color: #f87171;
    font-size: .84em;
    margin-top: 6px;
}
.error-msg.visible { display: block; }

/* ── API copy button hover state ─────────────────────────────────────────── */
.api-copy-btn.hovered {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31,102,229,0.30);
}
.api-hide-btn.hovered {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

/* ── Hub drive file list copy icon ──────────────────────────────────────── */
.hub-copy-icon {
    width: 13px;
    height: 13px;
    vertical-align: middle;
}

/* ── Hub permissions visibility / share section ─────────────────────────── */
.hub-vis-row {
    margin: 10px 0 4px;
}
.hub-vis-row-bottom {
    margin-bottom: 10px;
}
.hub-share-lbl {
    margin-bottom: 6px;
}
.hub-close-btn-top {
    margin-top: 12px;
}
.hub-note-small {
    font-size: .76em;
}

/* ── WS event table direction cell — color set by JS class ──────────────── */
.doc-ws-dir { padding: 6px 8px; font-size: 11px; font-weight: 600; font-family: monospace; }

/* ── Doc model platform badge ────────────────────────────────────────────── */
.doc-model-plat { font-size: 11px; padding: 2px 6px; border-radius: 3px; }

/* ── Hub permissions modal sizing ────────────────────────────────────────── */
.modal-hub-perms {
    max-width: 700px;
    width: 95vw;
}