@font-face {
  font-family: 'Spezia';
  src: url('../assets/fonts/Spezia.woff2') format('woff2'),
       url('../assets/fonts/Spezia.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Funnel Display';
  src: url('../assets/fonts/FunnelDisplay.woff2') format('woff2'),
       url('../assets/fonts/FunnelDisplay.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
    --white: oklch(99% 0.0026 264);
    --black: oklch(3.8% 0.026 264);
    --primary-blue: oklch(53% 0.24 264);
    --drk-blue: oklch(36% 0.16 264);
    --lt-blue1: oklch(95% 0.023 264);
    --lt-blue2: oklch(90% 0.047 264);
    --lt-blue3: oklch(85% 0.073 264);
    --primary-orange: oklch(73% 0.176 48);
    --lt-orange1: oklch(90% 0.056 48);
    --lt-orange2: oklch(85% 0.089 48);
    --red: oklch(65% 0.2 32);
    --green: oklch(0.643 0.157 155.63);
    --shadow-1: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-2: 0 4px 8px rgba(0,0,0,0.08);
    --collapsed: 80px;
    --expanded: 216px;
}

* {box-sizing: border-box; -moz-box-sizing: border-box; margin: 0; padding: 0; font-family: 'Spezia';}
body {display: flex; flex-direction: column; min-height: 100vh; margin: 0; font-size: 1rem; font-weight: 200; color: var(--black); background: var(--white);}
h1, h2, h3, h4 {margin: 0; font-weight: 600; font-family: 'Funnel Display';}
h1 {font-size: clamp(1.8rem, 0.784rem + 2.258vw, 2.5rem)}
h2 {font-size: clamp(1.53rem, 0.92rem + 1.355vw, 1.95rem)}
h3 {font-size: clamp(1.3rem, 0.981rem + 0.71vw, 1.52rem)}
h4 {font-size: clamp(1rem, 0.724rem + 0.613vw, 1.19rem)}
u {color:var(--primary-blue); cursor: pointer; margin: 0 0.25rem;}
a {text-decoration: none; cursor: pointer;}
strong { font-weight: 600;}

/* Composition */
.wrapper {
    width: 85vw;
    width: clamp(20rem, 85vw, 80rem);
    margin: 0 auto;
    padding: 0 6rem;
}
.wrapper--full {
    width: 100%;
    padding: 0 6rem;
}
.flow > * + * {
    margin-top: 2rem;
}
.flow--small > * + * {
    margin-top: 0.5rem;
}
header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--drk-blue);
}
header input {
    width: 50%;
    font-size: clamp(1.53rem, 0.92rem + 1.355vw, 1.95rem);
}

section {
    background:var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-1);
}
.section--outline {
    padding: 1rem;
    border: 1px solid var(--lt-blue3);
    border-radius: 8px;
}

.lucide {
    color: inherit;
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2px;
    cursor: pointer;
}

.sidenav {
    height: 100%;
    width: var(--collapsed);
    position: fixed;
    z-index: 1;
    background-color: var(--drk-blue);
    overflow-x: hidden;
    padding: 16px 0px 100px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sidenav a {
    padding: 8px 20px;
    text-decoration: none;
    color: var(--white);
    display: flex;
    border-radius: 8px;
    align-items: center;
}


.sidenav a:hover, .sidenav a.current {
    background-color: var(--primary-blue);
}

    .sidenav .nav-text, .sidenav .icon-text {
        display: none;
    }

/* Expanded state */
.sidenav:hover, .sidenav:focus-within {
    width: var(--expanded);
    align-items: flex-start;
    img {
        margin-left: 12px;
    }
    a {
        margin-left: 8px;
        width: calc(var(--expanded) - 16px);
    }
    .nav-text {
        display: block;
        margin: -16px 8px 0px 40px;
    }
    .icon-text {
        display: inline-block;
        padding-left: 8px;
    }
}

.userName {
    color: var(--primary-blue);
}
.container-title {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.container-title::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--drk-blue);
    align-self: center;
}
.subtitle {margin-bottom: 8px;}
.description {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flex-container {
    display: flex;
    align-items: flex-start stretch;
    gap: 16px;
}
.flex {flex: 1;}
.gap {gap: 1rem}
.center {text-align: center;}
.bottom {margin-top: auto;}
.right-align {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    gap: 8px;
}
.left-align {
    display: flex;
    justify-content: flex-end;
    margin-right: auto;
    gap: 8px;
}
.inline {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
}

button, .button{
    display: flex;
    width: fit-content;
    height: 36px;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--drk-blue);
    color: var(--drk-blue);
    font-size: 0.95rem;
    padding: 8px 16px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
}
button:hover, .button:hover {background-color: var(--lt-blue1)}
button:active, .button:active {background-color: var(--lt-blue2)}
button:focus-visible, .button:focus-visible {
    background-color: var(--lt-blue1);
    box-shadow: 0 0 0 4px var(--drk-blue);
}
button:disabled, .button:disabled {border: 2px solid var(--lt-blue1)}
.primary {
    background-color: var(--primary-orange);
    color:var(--white);
    border: none;
}
button.primary:hover, .button.primary:hover {
    background-color: var(--lt-orange2);
    color: var(--black);
}
button.primary:active, .button.primary:active {
    background-color: var(--lt-orange1);
    color: var(--black);
}
button.primary:focus-visible, .button.primary:focus-visible {
    background-color: var(--primary-orange);
    box-shadow: 0 0 0 5px var(--primary-orange);
}
button.primary:disabled, .button.primary:disabled {
    background-color: var(--lt-orange1);
    color: var(--black);
}
.tertiary {border: none}
.button-label {
    text-align: right;
    margin-bottom: 8px;
}

.hidden {display: none}
.hidden.show {display: table-row}
.hidden.block {display: block}

.view-all {
    display: inline-flex;
    padding: 0px 0px 8px 8px;
    cursor: pointer;
}
.arrow {
    align-self: center;
    flex-shrink:0;
}
.arrow.open {
    transform: rotate(180deg);
}

.info-table {
    padding: 16px;
    background: var(--white);
    margin-bottom: 16px;
    border-radius: 8px;
}

table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--white);
    padding: 24px;
    border-radius: 8px;
    margin: 8px 0px;
}
th, td {
    text-align: left;
    overflow-wrap: break-word;
    padding: 8px;
}
th {border-bottom: 1px solid var(--drk-blue)}

tr {border-bottom: 1px solid var(--lt-blue3)}
tr:last-child {border: none}

tfoot {border-top: 1px solid var(--drk-blue)}
.highlight tr:hover td {background-color: var(--lt-blue1);}
.table-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.table-icon {
    color: var(--black);
    margin-left: 8px;
}
.fake-pagination {
    width: fit-content;
    display: flex;
    border: 1px solid var(--lt-blue3);
    padding: 8px;
    border-radius: 8px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}
.card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
}
.card__apps {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
}
.card h3 {
    margin-bottom: auto;
}
.card button {
    margin: 4px;
    text-align: left;
    width: fit-content;
}
.button-wrap{
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 8px;
}

.login__slash {
    position: fixed;
    inset: 0;
    background: var(--primary-blue);
    clip-path: polygon(0 0, calc(50% - 50vh * tan(23deg)) 0, calc(50% + 50vh * tan(23deg)) 100%, 0 100%);
    /* transition: clip-path 1s cubic-bezier(0.77, 0, 0.175, 1); */
    z-index: -1;
}
.login__card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "img form" "footer footer";
    column-gap: 2rem;
    background: oklch(99% 0.0026 264 / 0.9);
    margin-top: 20%;
    padding: 32px;
    border-radius: 8px;
}
.login__img {
    grid-area: img;
    max-width: 80%;
    height: auto;
    object-fit: contain;
    justify-self: center;
}
.login__form {
    grid-area: form;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.login__footer {
    grid-area: footer;
    justify-self: center;
    gap: 1rem;
    margin-top: 2rem;
}
.login--buttons {
    display: flex;
    flex-wrap: wrap;
    white-space: nowrap;
}
@media screen and (max-width: 980px) {
    .login__card {
        grid-template-columns: 1fr;
        grid-template-areas: "img" "form" "footer";
    }
    .login__img {
        width: 40%;
    }
}

.upload-box {
    width: 100%;
    border: 2px dashed var(--lt-blue3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.upload-box input {margin-top: 10px;}
.url-input {
    width: 80%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--lt-blue3);
}
.upload {
    height: 32%;
    text-align: center;
    cursor: pointer;
}
.search-container {
    position: relative;
    width: 300px;
}
.search-icon {
    position: absolute;
    right: 16px;
    top: 32%;
    transform: translateY(-50%);
    color: var(--black);
}

/* form */
.form__section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form__line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.form__item {
    display: flex;
    flex-direction: column;
}
input, .input, textarea {
    background-color:var(--white);
    padding: 0.5rem;
    border: 1px solid var(--lt-blue3);
    border-radius: 8px;
    font-size: 0.9rem;
}
textarea {
    resize: vertical;
}
.form--baseline {align-self: flex-end}
.form--stretch {justify-content: space-between}
.form--gap {gap: 1rem}
.form__notes {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.dropdown, .text-box, .prompt{
    background-color:var(--white);
    width: 100%;
    padding: 8px;
    border: none;
    margin-bottom: 16px;
    border-radius: 8px;
}
input, .input, textarea, select {
    background-color:var(--white);
    padding: 0.5rem;
    border: 1px solid var(--lt-blue3);
    border-radius: 8px;
    font-size: 0.9rem;
}
.outline {
    border: 1px solid var(--lt-blue3);
    margin: 0px;
}
.app-select {width: 24%;}
input[type="radio"], input[type="checkbox"] {
    margin: 8px;
    accent-color: var(--primary-blue);
}
input[type="file"] {margin: 8px;}
.paragraph {
    resize: vertical;
    height: 60%; 
}

.boxes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 32px;
}
.inline-lrg {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 16px;
}
.info-icon {
    color: var(--primary-blue);
    width: 16px;
    height: 16px;
    cursor: help;
}
.chip {
    background-color: var(--lt-blue1);
    width: fit-content;
    border-radius: 16px;
    padding: 8px;
}
.progress-container {
  width: 100%;
  background-color: #d1dfff;
  border-radius: 8px;
}
.progress-bar {
    background-color: var(--drk-blue);
    color: var(--white);
    text-align: right;
    padding-right: 8px;
    border-radius: 8px;
}

/* ===== ARTI Conversation (replace your current dialog + msg CSS with this) ===== */
.ARTI-dialog {
    flex: 1;
    overflow-y: auto;
    margin: 0 8px 8px 8px;
    padding: 10px;
    background: var(--white);
}
/* message row alignment */
.ARTI-dialog .msg-row {display: flex;}
.ARTI-dialog .msg-row.user {justify-content: flex-end;}
.ARTI-dialog .msg-row.bot {justify-content: flex-start;}
/* bubble container: grid with title bar + body */
.ARTI-dialog .msg-bubble {
    width: fit-content;
    max-width: 84%;
    text-align: left; /* defeat inherited centering */
    font-size: 0.9rem;
}
/* title bar (who) */
.ARTI-dialog .msg-title {
    padding: 0 0.5rem;
    color: gray;
}
.ARTI-dialog .msg-row.user .msg-title {
    text-align: right;
}
/* message body */
.ARTI-dialog .msg-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: var(--shadow-1);
    padding: 1rem 2rem;
}
/* user vs bot color treatment */
.ARTI-dialog .msg-row.user .msg-text {
    background: var(--lt-blue2);
    border-radius: 16px 16px 0 16px;
}
.ARTI-dialog .msg-row.bot .msg-text {
    border: 2px solid var(--lt-blue2);
    border-radius: 16px 16px 16px 0;
}
/* If you have global styles that add margins to divs, neutralize within chat */
.ARTI-dialog .msg-bubble,
.ARTI-dialog .msg-title,
.ARTI-dialog .msg-text {
    margin: 0;
}
.ARTI-header {
    display: flex;
    flex: 0 0 auto;
    margin: 5px 8px 0px 7px;
    padding: 0.5rem;
    border-radius: 8px 8px 0px 0px;
    justify-content: space-between;
}
.ARTI-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0px 16px 16px;
    padding: 0.5rem;
    border: 2px solid var(--lt-blue3);
    border-radius: 16px;
}
.ARTI-input-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}
.ARTI-input-prompt select:hover {
    background: var(--lt-blue1);
}
/* Parent must allow the middle pane to shrink */
.ARTI-display {
    height: 80vh;
    align-self: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* IMPORTANT */
    padding: 0px;
}
/* Dialog fills remaining height and scrolls internally */
.ARTI-dialog {
    flex: 1 1 auto; /* IMPORTANT */
    min-height: 0; /* IMPORTANT */
    overflow-y: auto;
}
#savedPrompts {
    flex-shrink: 6;
    margin: 0;
}
#userPrompt {
    margin: 0;
    outline: none;
    height: auto;
    min-height: 0;
    line-height: normal;
    resize: none;
    overflow: hidden;
}

.source-tabs {display: flex;}
.tab {
    background-color: transparent;
    color: var(--black);
    border: none;
    border-bottom: 2px solid var(--lt-orange1);
}
.tab:hover {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-orange);
}
.tab.active {
    background-color: var(--lt-orange1);
    border-bottom: 2px solid var(--primary-orange);
}
.panel {display: none;}
.panel.active {display: block;}
.panel.show {display: flex;}

/* Modals */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    z-index: 1000;
}

.backdrop.show {
    display: flex;
}

.modal {
    width: 520px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Only affects this one modal */
#modalNewAccount.backdrop {
    padding: 24px;
    box-sizing: border-box;
}

#modalNewAccount .modal {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    width: 800px;
}

.modal .text-box, .modal .dropdown {
    border: 1px solid var(--lt-blue3);
    margin-bottom: 8px;
}

#tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 12rem;
    background: var(--drk-blue);
    color: var(--white);
    padding: 6px 10px;
    border-radius: 0px 6px 6px 6px;
    font-size: .8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  
  #tooltip.visible {
    opacity: 1;
  }

footer {
    align-items: flex-end;
    text-align: center;
    padding: 16px;
    margin-top: 48px;
}

@media screen and (max-width: 768px) {
    .main {
        width: stretch;
        margin: 0 16px 0 96px;
    }
    .flex-container {
        flex-direction: column;
    }
    .inline {
        flex-direction: column;
    }
    .app-card {
        flex-basis: none;
        max-width: none;
    }
    #inline-script {
        overflow-wrap: break-word;
    }
}

@media screen and (min-width: 768px) {
    .main {
        width: stretch;
        margin: 0 16px 0 96px;
    }
}

@media screen and (min-width: 980px) {
    .main {
        width: 788px;
        margin: 0;
    }
}

@media screen and (min-width: 1329px) {
    .main {
        width: 1200px;
        margin: 0;
    } 
}


/* Backdrop */
.rw-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
}

/* Dialog */
.rw-modal {
    position: fixed;
    left: 50%;
    top: 15%;
    transform: translateX(-50%);
    width: 450px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    z-index: 9999;
    overflow: hidden;
    font-family: inherit;
}

/* Title bar (contrasting) */
.rw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #1f2937; /* dark slate */
    color: #fff;
}

.rw-modal-title {
    font-size: 15px;
    font-weight: 600;
}

.rw-modal-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    border-radius: 6px;
}

    .rw-modal-close:hover {
        background: rgba(255,255,255,.15);
    }

.rw-modal-body {
    padding: 16px 12px;
}

.rw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e6e6e6;
}

.rw-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cfcfcf;
    background: #f6f6f6;
    cursor: pointer;
}

    .rw-btn:hover {
        background: #eaeaea;
    }

/* Primary button with readable hover */
.rw-btn-primary {
    border-color: #1d4ed8;
    background: #2563eb;
    color: #fff;
}

    .rw-btn-primary:hover {
        background: #1d4ed8; /* darker, keeps white text readable */
        border-color: #1d4ed8;
    }

/* Keep it from behaving like a clickable link */
.sidenav a.sidenav-info {
    cursor: default;
}

    .sidenav a.sidenav-info:hover {
        background-color: transparent; /* or keep the hover color if you want */
    }


/* Toast container (top-center) */
.rw-toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    align-items: center; /* keeps varying widths centered */
}

/* Toast */
.rw-toast {
    width: 340px;
    max-width: calc(100vw - 32px);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: stretch;
    font-family: inherit;
}

.rw-toast-bar {
    width: 8px;
    flex: 0 0 8px;
}

.rw-toast-content {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    align-items: flex-start;
    flex: 1 1 auto;
}

.rw-toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    margin-top: 1px;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}

.rw-toast-text {
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.25rem;
    color: #111827;
    word-break: break-word;
}

.rw-toast-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    padding: 8px 10px;
    align-self: flex-start;
}

    .rw-toast-close:hover {
        color: #111827;
    }

/* Type styles */
.rw-toast-success .rw-toast-bar {
    background: #16a34a;
}

.rw-toast-success .rw-toast-icon {
    background: #dcfce7;
    color: #166534;
}

.rw-toast-info .rw-toast-bar {
    background: #2563eb;
}

.rw-toast-info .rw-toast-icon {
    background: #dbeafe;
    color: #1e40af;
}

.rw-toast-error .rw-toast-bar {
    background: #dc2626;
}

.rw-toast-error .rw-toast-icon {
    background: #fee2e2;
    color: #991b1b;
}

/* Simple enter/exit animations */
.rw-toast {
    transform: translateY(-6px);
    opacity: 0;
    transition: transform 160ms ease, opacity 160ms ease;
}

    .rw-toast.rw-toast-show {
        transform: translateY(0);
        opacity: 1;
    }

    .rw-toast.rw-toast-hide {
        transform: translateY(-6px);
        opacity: 0;
    }


.invalid {
    border: 2px solid red !important;
}

.rw-modal-field {
    padding: 0 12px 16px 12px;
}

.rw-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #cfcfcf;
    outline: none;
    font-size: 14px;
}

    .rw-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    }

.rw-modal-error {
    margin-top: 8px;
    color: #b91c1c;
    font-size: 13px;
    display: none;
}

.textarea-tall {
    height: 280px;
}

/* Typing indicator */
.msg-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 8px 10px;
}

    .msg-typing .dot {
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: rgba(0,0,0,0.35);
        animation: artiDot 1s infinite ease-in-out;
    }

        .msg-typing .dot:nth-child(2) {
            animation-delay: 0.15s;
        }

        .msg-typing .dot:nth-child(3) {
            animation-delay: 0.30s;
        }

@keyframes artiDot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.0);
        opacity: 1;
    }
}

#processingStatus {
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background: #fafafa;
    box-sizing: border-box;
}

    /* Each section/card */
    #processingStatus .status-block {
        background: #fff;
        border: 1px solid #e6e6e6;
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

        /* Remove bottom margin from last one */
        #processingStatus .status-block:last-child {
            margin-bottom: 0;
        }

        /* Section title */
        #processingStatus .status-block h3 {
            margin: 0 0 10px 0;
            font-size: 14px;
            font-weight: 600;
            color: #2f3b52;
            border-bottom: 1px solid #f0f0f0;
            padding-bottom: 6px;
        }

    /* Rows inside each section */
    #processingStatus .status-row {
        display: grid;
        grid-template-columns: 170px 1fr;
        gap: 8px;
        padding: 4px 0;
        font-size: 13px;
        line-height: 1.35;
    }

    /* Label / value styling */
    #processingStatus .status-label {
        font-weight: 600;
        color: #555;
    }

    #processingStatus .status-value {
        color: #222;
        word-break: break-word;
    }

    /* Subtle zebra effect inside cards (optional but nice) */
    #processingStatus .status-row:nth-child(even) {
        background: #fcfcfc;
        border-radius: 4px;
    }

    /* Scrollbar polish (Chrome/Edge) */
    #processingStatus::-webkit-scrollbar {
        width: 10px;
    }

    #processingStatus::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 8px;
    }

    #processingStatus::-webkit-scrollbar-thumb {
        background: #c7c7c7;
        border-radius: 8px;
    }

        #processingStatus::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }



.file-drop-zone {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 1rem;
    border: 4px dashed var(--lt-blue2);
    border-radius: 8px;
    padding: 2rem;
}
.file-drop-zone.drag-over {
    border-color: var(--lt-blue3);
    background: var(--lt-blue2);
}
.file-summary {
    margin-left: 8px;
}

.file-list {
    list-style: none;
    margin: 0 0 10px 0;
    padding: 0;
}

.file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

    .file-list-item:last-child {
        border-bottom: none;
    }

.file-list-item-meta {
    min-width: 0;
    flex: 1;
}

.file-list-item-name {
    font-weight: 600;
    word-break: break-word;
}

.file-list-item-details {
    font-size: 12px;
    opacity: 0.75;
}

.file-upload-status {
    margin-top: 8px;
    min-height: 18px;
}

    .file-upload-status.success {
        color: #0a7a2f;
    }

    .file-upload-status.error {
        color: #b00020;
    }

    .file-upload-status.info {
        color: inherit;
    }

.rw-wait-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}

.rw-wait-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.18);
    border-top-color: rgba(0,0,0,0.65);
    border-radius: 50%;
    animation: rw-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

.rw-wait-text {
    line-height: 1.3;
}

@keyframes rw-spin {
    to {
        transform: rotate(360deg);
    }
}

.rw-redirect-content .status-block {
    margin: 0 0 14px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

    .rw-redirect-content .status-block h3 {
        margin: 0 0 8px 0;
        font-size: 14px;
    }

.rw-redirect-content .status-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px;
    padding: 2px 0;
}

.rw-redirect-content .status-label {
    font-weight: 600;
}

.rw-redirect-countdown {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-weight: 600;
    position: sticky; /* nice touch */
    bottom: 0;
    background: #fff;
}

.rw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(960px, 92vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.rw-modal-header,
.rw-modal-actions {
    flex: 0 0 auto;
}

.rw-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0; /* important for flex scrolling */
    padding: 16px;
}

/* Optional larger modal for status display */
.rw-modal-redirect {
    width: min(1000px, 94vw);
    max-height: 88vh;
}

    /* Let modal body host a flex layout */
    .rw-modal-redirect .rw-modal-body {
        padding: 0; /* wrapper handles spacing */
        overflow: hidden; /* prevent double-scroll */
        min-height: 0;
    }

/* Wrapper fills body and flexs into scroll area + footer */
.rw-redirect-wrap {
    display: flex;
    flex-direction: column;
    max-height: 70vh; /* tune as needed */
    min-height: 0;
}

/* This is the only scrolling area */
.rw-redirect-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 16px 16px 8px 16px;
}

/* Footer stays below content (no sticky needed) */
.rw-redirect-footer {
    flex: 0 0 auto;
    border-top: 1px solid #eee;
    background: #fff;
    padding: 10px 16px 12px 16px;
}
.rw-redirect-countdown {
    font-weight: 600;
}

.folder__tree {
    max-height: 25rem;
    overflow-y: auto;
}
.folder-node {
    margin-left: 0;
}
.folder-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
}
    .folder-row:hover {
        background: var(--lt-blue1);
    }
.folder-expand {
    width: 22px;
    min-width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #444;
}
    .folder-expand.empty {
        visibility: hidden;
        cursor: default;
    }
.folder-check {
    margin: 0;
}
.folder-name {
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: none;
    flex: 1;
}
    .folder-name:hover {
        text-decoration: underline;
    }
.folder-size {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
.folder-children {
    margin-left: 28px;
    padding-left: 12px;
    border-left: 1px solid #e3e3e3;
    display: none;
}
.folder-node.expanded > .folder-children {
    display: block;
}
.folder-node.selected > .folder-row {
    background: #eaf3ff;
    border: 1px solid #cfe2ff;
}
.folder-loading,
.folder-empty,
.folder-error {
    padding: 8px 10px;
    font-size: 13px;
    color: #666;
}
.folder-expand {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 30px;
    color: #444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
}
    .folder-expand:hover {
        background: #e9eef5;
    }
    .folder-expand.empty {
        visibility: hidden;
        cursor: default;
    }

.rw-scan-actions {
    margin: 16px 0 18px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .rw-scan-actions .rw-btn {
        min-width: 180px;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 700;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        border: 1px solid #cbd5e1;
        background: #f8fafc;
        color: #1e293b;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    }
        .rw-scan-actions .rw-btn:hover {
            background: #e2e8f0;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
            transform: translateY(-1px);
        }

        .rw-scan-actions .rw-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        }

        .rw-scan-actions .rw-btn:focus {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }

    /* Primary-looking dashboard button */
    .rw-scan-actions #btnReturnToDashboard {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
    }

        .rw-scan-actions #btnReturnToDashboard:hover {
            background: #1d4ed8;
            border-color: #1d4ed8;
        }

    /* Strong danger button */
    .rw-scan-actions #btnTerminateScan {
        background: #dc2626;
        border-color: #dc2626;
        color: #fff;
    }

        .rw-scan-actions #btnTerminateScan:hover {
            background: #b91c1c;
            border-color: #b91c1c;
        }

    .rw-scan-actions .rw-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.end-emulation-link {
    cursor: pointer;
}

    .end-emulation-link:hover {
        text-decoration: underline;
    }

.inline-script-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inline-script-sample-link {
    text-decoration: underline;
    cursor: pointer;
}

.inline-script-note {
    margin: 0;
}
#systemPromptListDescription {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #555;
}

#systemPromptListDescription {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #555;
}

#systemPrompt[readonly] {
    background: #f7f7f7;
    color: #444;
    cursor: not-allowed;
}

.text--white{color:var(--white)} .bg--white{background:var(--white)}
.text--black{color:var(--black)} .bg--black{background:var(--black)}
.text--primary-blue{color:var(--primary-blue)} .bg--primary-blue{background:var(--primary-blue)}
.text--drk-blue{color:var(--drk-blue)} .bg--drk-blue{background:var(--drk-blue)}
.text--lt-blue1{color:var(--lt-blue1)} .bg--lt-blue1{background:var(--lt-blue1)}
.text--lt-blue2{color:var(--lt-blue2)} .bg--lt-blue2{background:var(--lt-blue2)}
.text--lt-blue3{color:var(--lt-blue3)} .bg--lt-blue3{background:var(--lt-blue3)}
.text--primary-orange{color:var(--primary-orange)} .bg--primary-orange{background:var(--primary-orange)}
.text--lt-orange1{color:var(--lt-orange1)} .bg--lt-orange1{background:var(--lt-orange1)}
.text--lt-orange2{color:var(--lt-orange2)} .bg--lt-orange2{background:var(--lt-orange2)}
.text--red{color:var(--red)} .bg--red{background:var(--red)}
.text--green{color:var(--green)} .bg--green{background:var(--green)}


.toggle__container {display: flex; gap: 0.3rem;}
.toggle { display: inline-flex; align-self: baseline; align-items: center; cursor: pointer; margin-left: 1rem;}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { position: relative; width: 2.75rem; height: 1.5rem; background: var(--mid-gray, #ccc); border-radius: 999px; transition: background 0.2s; flex-shrink: 0; }
.toggle input:checked ~ .toggle-track { background: var(--primary-blue); }
.toggle-thumb { position: absolute; top: 0.2rem; left: 0.2rem; width: 1.1rem; height: 1.1rem; background: white; border-radius: 50%; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked ~ .toggle-track .toggle-thumb { left: calc(100% - 1.3rem); }

.breadcrumb-nav { font-size: 0.85rem; color: var(--drk-blue); margin-top: 2rem;}
.breadcrumb-nav a { color: var(--primary-blue); text-decoration: none; }
.breadcrumb-nav a:hover { text-decoration: underline; }
.breadcrumb-nav .breadcrumb-sep { margin: 0 0.4rem; color: var(--drk-blue); }