.documents-screen {
    width: min(1220px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid #e4e9f4;
    border-radius: 22px;
    background: #f7f9fe;
    color: #172554;
    box-shadow: 0 18px 55px rgba(30, 55, 105, .13);
}

.documents-screen input,
.documents-screen select,
.documents-screen textarea {
    font-family: inherit;
}

.documents-header,
.documents-section-heading,
.documents-page-heading,
.documents-chat-heading,
.documents-upload-controls,
.documents-editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.documents-header {
    margin-bottom: 22px;
}

.documents-header h1 {
    margin: 3px 0 5px;
    color: #172554;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.04em;
}

.documents-header p,
.documents-section-heading p,
.documents-page-heading p,
.documents-chat-heading p {
    margin: 0;
    color: #66748f;
    font-size: 13px;
}

.documents-eyebrow,
.documents-banner-kicker {
    color: #6952d8 !important;
    font-size: 11px !important;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.documents-ai-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #e2e7f2;
    border-radius: 999px;
    background: #f7f8fc;
    color: #596781;
    font-size: 12px;
    white-space: nowrap;
}

.documents-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.documents-ai-status.is-ready .documents-status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px #dcfce7;
}

.documents-ai-status.is-offline .documents-status-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px #fee2e2;
}

.documents-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    margin-bottom: 22px;
    border-bottom: 1px solid #e1e7f1;
    scrollbar-width: thin;
}

.documents-tabs button {
    position: relative;
    flex: 0 0 auto;
    padding: 11px 15px 13px;
    border: 0;
    background: transparent;
    color: #66748f;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.documents-tabs button:hover,
.documents-tabs button.is-active {
    color: #5140c8;
}

.documents-tabs button.is-active::after {
    position: absolute;
    right: 12px;
    bottom: -1px;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #6754dc;
    content: "";
}

.documents-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
}

.documents-notice.is-error,
.documents-inline-error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b42318;
}

.documents-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, .9fr);
    gap: 16px;
}

.documents-overview-main,
.documents-stats {
    display: grid;
    align-content: start;
    gap: 16px;
}

.documents-ai-banner {
    position: relative;
    display: flex;
    min-height: 194px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 25px 28px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 84% 26%, rgba(255,255,255,.28), transparent 25%),
        linear-gradient(115deg, #6748d6 0%, #7356e4 54%, #51b8d2 100%);
    color: #fff;
}

.documents-ai-banner > div:first-child {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.documents-ai-banner .documents-banner-kicker {
    color: rgba(255,255,255,.77) !important;
}

.documents-ai-banner h2 {
    max-width: 480px;
    margin: 9px 0 7px;
    color: #fff;
    font-size: clamp(19px, 2.4vw, 26px);
    line-height: 1.2;
}

.documents-ai-banner p {
    max-width: 490px;
    margin: 0 0 15px;
    color: rgba(255,255,255,.88);
    font-size: 13px;
    line-height: 1.5;
}

.documents-ai-banner button,
.documents-upload-controls > button:not(.documents-secondary-button),
.documents-composer button,
.documents-editor-actions > button[type="submit"],
.documents-assistant-actions > button:first-child {
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    background: #5b47d2;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
}

.documents-ai-banner button {
    background: #fff;
    color: #5140c8;
}

.documents-ai-banner button:hover,
.documents-screen button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.documents-banner-mark {
    display: grid;
    width: 82px;
    height: 82px;
    flex: 0 0 auto;
    place-items: center;
    margin: 0 8px 0 16px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 25px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 43px;
    transform: rotate(7deg);
}

.documents-stat-card,
.documents-recent-card,
.documents-history,
.documents-chat,
.documents-drop-zone,
.documents-table-wrap {
    border: 1px solid #e5eaf3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(28, 50, 93, .045);
}

.documents-stat-card {
    display: grid;
    min-height: 81px;
    grid-template-columns: 39px 1fr;
    align-content: center;
    align-items: center;
    gap: 0 11px;
    padding: 13px 15px;
}

.documents-stat-card > span:nth-child(2) {
    color: #68758d;
    font-size: 12px;
}

.documents-stat-card strong {
    grid-column: 2;
    margin-top: 3px;
    color: #172554;
    font-size: 23px;
}

.documents-stat-icon {
    display: grid;
    width: 36px;
    height: 36px;
    grid-row: span 2;
    place-items: center;
    border-radius: 11px;
    background: #eff4ff;
    color: #4979df;
    font-size: 17px;
    font-weight: 800;
}

.documents-stat-icon.is-green {
    background: #e8fbf1;
    color: #13a469;
}

.documents-stat-icon.is-amber {
    background: #fff7e7;
    color: #df9a12;
}

.documents-stat-icon.is-red {
    background: #fff0ef;
    color: #e55252;
}

.documents-recent-card {
    min-width: 0;
    padding: 18px;
}

.documents-section-heading {
    margin-bottom: 14px;
}

.documents-section-heading h2,
.documents-page-heading h2,
.documents-chat-heading h2,
.documents-history h2,
.documents-editor-card h2 {
    margin: 0 0 4px;
    color: #172554;
    font-size: 17px;
}

.documents-text-button {
    padding: 7px 9px;
    border: 0;
    background: transparent;
    color: #5847ce;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.documents-table-wrap {
    overflow: auto;
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.documents-table th {
    padding: 11px 12px;
    background: #f7f9fd;
    color: #748099;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.documents-table td {
    max-width: 250px;
    padding: 12px;
    border-top: 1px solid #edf0f5;
    color: #34425c;
    vertical-align: middle;
}

.documents-recent-card .documents-table th:nth-child(2),
.documents-recent-card .documents-table td:nth-child(2),
.documents-recent-card .documents-table th:nth-child(4),
.documents-recent-card .documents-table td:nth-child(4) {
    display: none;
}

.documents-recent-card .documents-table td:first-child {
    max-width: 230px;
    width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documents-recent-card .documents-row-title {
    max-width: 190px;
}

.documents-table td:first-child {
    color: #1b2b4c;
    font-weight: 650;
}

.documents-row-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.documents-file-badge {
    display: grid;
    width: 27px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 6px;
    background: #eef4ff;
    color: #4b72cb;
    font-size: 9px;
    font-weight: 800;
}

.documents-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0f3f8;
    color: #53627a;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.documents-status.is-green {
    background: #e7f8ee;
    color: #14834f;
}

.documents-status.is-blue {
    background: #ebf2ff;
    color: #3e64b8;
}

.documents-status.is-amber {
    background: #fff5df;
    color: #a56a00;
}

.documents-status.is-red {
    background: #ffeded;
    color: #b42318;
}

.documents-row-open {
    padding: 6px 9px;
    border: 1px solid #e4e9f2;
    border-radius: 7px;
    background: #fff;
    color: #4b54a3;
    cursor: pointer;
    font-size: 11px;
}

.documents-empty-state {
    padding: 26px 16px;
    color: #738099;
    font-size: 13px;
    text-align: center;
}

.documents-assistant-layout {
    display: grid;
    min-height: 565px;
    grid-template-columns: minmax(205px, 250px) minmax(0, 1fr);
    gap: 15px;
}

.documents-history {
    padding: 15px;
}

.documents-history .documents-section-heading button,
.documents-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #e2e7f0;
    border-radius: 9px;
    background: #fff;
    color: #5746d0;
    cursor: pointer;
    font-size: 20px;
}

.documents-conversation-list {
    display: grid;
    gap: 5px;
}

.documents-conversation-button {
    overflow: hidden;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #53617b;
    cursor: pointer;
    font-size: 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-conversation-button:hover,
.documents-conversation-button.is-active {
    border-color: #e5e3fb;
    background: #f5f4ff;
    color: #5140c8;
}

.documents-chat {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 19px;
}

.documents-chat-heading {
    align-items: flex-start;
    margin-bottom: 12px;
}

.documents-gemini-label {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f0edff;
    color: #6550cf;
    font-size: 11px;
    font-weight: 750;
}

.documents-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 2px 0 13px;
}

.documents-prompt-chips button {
    padding: 7px 9px;
    border: 1px solid #e4e8f2;
    border-radius: 999px;
    background: #fff;
    color: #566580;
    cursor: pointer;
    font-size: 11px;
}

.documents-chat-messages {
    display: flex;
    min-height: 280px;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 14px 4px;
    border-top: 1px solid #edf0f6;
    border-bottom: 1px solid #edf0f6;
}

.documents-chat-empty {
    align-self: center;
    max-width: 430px;
    margin: auto;
    color: #818ca2;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.documents-chat-message {
    max-width: min(88%, 680px);
    padding: 11px 13px;
    border: 1px solid #e8ebf3;
    border-radius: 12px;
    background: #f8f9fd;
    color: #263650;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.documents-chat-message.is-user {
    align-self: flex-end;
    border-color: #ded8ff;
    background: #f1eeff;
}

.documents-message-label {
    display: block;
    margin-bottom: 4px;
    color: #6753ce;
    font-size: 10px;
    font-weight: 750;
}

.documents-composer {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-top: 12px;
}

.documents-composer textarea,
.documents-editor-form input,
.documents-editor-form select,
.documents-editor-form textarea,
.documents-upload-controls select,
.documents-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #20304c;
    font-size: 13px;
}

.documents-composer textarea:focus,
.documents-editor-form input:focus,
.documents-editor-form select:focus,
.documents-editor-form textarea:focus,
.documents-upload-controls select:focus,
.documents-search input:focus {
    border-color: #8575e3;
    box-shadow: 0 0 0 3px rgba(103, 84, 220, .12);
}

.documents-composer textarea {
    resize: vertical;
}

.documents-composer button {
    min-height: 42px;
    flex: 0 0 auto;
}

.documents-assistant-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-top: 12px;
}

.documents-ai-title-label {
    display: grid;
    width: min(280px, 100%);
    gap: 5px;
    color: #566580;
    font-size: 11px;
    font-weight: 650;
}

.documents-ai-title-label input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    background: #fff;
    color: #20304c;
    font: inherit;
}

.documents-secondary-button {
    padding: 8px 11px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    background: #fff;
    color: #4c5d78;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.documents-inline-error {
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 12px;
}

.documents-page-heading {
    margin-bottom: 17px;
}

.documents-drop-zone {
    display: grid;
    min-height: 240px;
    place-content: center;
    justify-items: center;
    padding: 24px;
    border: 1px dashed #a9a0f0;
    background: #fbfaff;
    text-align: center;
    transition: background .15s ease, border-color .15s ease;
}

.documents-drop-zone.is-dragging {
    border-color: #6551d2;
    background: #f1efff;
}

.documents-upload-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 16px;
    background: #eeebff;
    color: #6551d2;
    font-size: 29px;
}

.documents-drop-zone h3 {
    margin: 2px 0 6px;
    color: #243452;
    font-size: 17px;
}

.documents-drop-zone p {
    margin: 0 0 15px;
    color: #78849b;
    font-size: 12px;
}

.documents-file-queue {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.documents-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5eaf3;
    border-radius: 9px;
    background: #fff;
    color: #4a5871;
    font-size: 12px;
}

.documents-file-item strong {
    overflow: hidden;
    flex: 1;
    color: #263652;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-file-item button {
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: #b42318;
    cursor: pointer;
}

.documents-upload-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 16px;
}

.documents-upload-controls label,
.documents-editor-form > label,
.documents-form-grid label {
    display: grid;
    gap: 6px;
    color: #566580;
    font-size: 12px;
    font-weight: 650;
}

.documents-upload-controls label {
    width: min(260px, 100%);
}

.documents-progress {
    margin-top: 15px;
}

.documents-progress > div {
    height: 8px;
    overflow: hidden;
    border-radius: 9px;
    background: #e9edf5;
}

.documents-progress > div span {
    display: block;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5947cd, #57b2d1);
    animation: documents-progress 1.2s ease-in-out infinite;
}

.documents-progress.is-determinate > div span {
    width: var(--documents-progress, 0%);
    animation: none;
    transition: width .15s ease;
}

.documents-progress p {
    margin: 7px 0 0;
    color: #65728a;
    font-size: 12px;
}

@keyframes documents-progress {
    from { transform: translateX(-120%); }
    to { transform: translateX(320%); }
}

.documents-search {
    width: min(340px, 100%);
}

.documents-modal {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(14, 25, 50, .55);
}

.documents-editor-card {
    width: min(820px, 100%);
    max-height: min(92vh, 900px);
    overflow: auto;
    padding: clamp(17px, 3vw, 26px);
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(10, 20, 45, .26);
}

.documents-editor-card > .documents-section-heading {
    margin-bottom: 18px;
}

.documents-editor-form {
    display: grid;
    gap: 13px;
}

.documents-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.documents-editor-form textarea {
    resize: vertical;
    line-height: 1.5;
}

.documents-template-check {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
}

.documents-template-check input {
    width: auto;
}

.documents-editor-footnote {
    margin: 0;
    color: #78849b;
    font-size: 11px;
    line-height: 1.5;
}

.documents-editor-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 6px;
}

.documents-screen button:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

/* Reference-exact workspace shell */
#documentsScreen.screen {
    position: fixed;
    z-index: 1200;
    inset: 0;
    width: auto;
    max-height: none;
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #f4f5fb;
    box-shadow: 0 5px 18px rgba(22, 42, 74, .10);
    margin: 0;
    max-width: none;
    min-height: 0;
}

.documents-side-nav {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 12px 7px 10px;
    background: #1c2747;
    color: #fff;
}

.documents-side-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 3px 10px;
}

.documents-side-brand img {
    width: 27px;
    height: 27px;
    border-radius: 7px;
    object-fit: cover;
}

.documents-side-brand span {
    display: grid;
    min-width: 0;
}

.documents-side-brand strong {
    font-size: 9px;
}

.documents-side-brand small {
    color: #99a8c9;
    font-size: 7px;
}

.documents-side-nav nav {
    display: grid;
    gap: 3px;
}

.documents-side-nav nav button {
    display: flex;
    height: 31px;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b9c4dc;
    cursor: pointer;
    font-size: 8px;
    text-align: left;
}

.documents-side-nav nav button > span:first-child {
    width: 14px;
    color: #aeb9d1;
    font-size: 12px;
    text-align: center;
}

.documents-side-nav nav button.is-active {
    background: #5845c7;
    color: #fff;
}

.documents-side-nav nav button.is-active > span:first-child {
    color: #9d9cff;
}

.documents-side-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 2px 2px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.documents-side-profile > span {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    background: #6f82c7;
    font-size: 9px;
    font-weight: 800;
}

.documents-side-profile div {
    display: grid;
}

.documents-side-profile strong {
    font-size: 7px;
}

.documents-side-profile small {
    color: #9aa8c8;
    font-size: 7px;
}

.documents-main {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    min-width: 0;
    overflow: auto;
    padding: 14px 15px 18px 22px;
    background: #f7f8fc;
}

.documents-header {
    flex: 0 0 49px;
    height: 49px;
    margin: 0 0 4px;
    align-items: flex-start;
}

.documents-header .documents-eyebrow {
    display: none;
}

.documents-header h1 {
    margin: 0 0 2px;
    background: none;
    color: #283652 !important;
    font-size: 20px;
    letter-spacing: -.02em;
    -webkit-text-fill-color: #283652;
}

.documents-header > div:first-child > p:last-child {
    color: #8994a7;
    font-size: 9px;
}

.documents-header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.documents-ai-status {
    height: 26px;
    padding: 5px 8px;
    border: 0;
    background: #f8faff;
    color: #6d7790;
    font-size: 8px;
}

.documents-status-spark {
    color: #6652d2;
    font-size: 12px;
}

.documents-notification-button {
    display: grid !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 0 !important;
    place-items: center;
    padding: 0 !important;
    border: 1px solid #e8ebf3 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #61708a !important;
    font-size: 13px !important;
}

.documents-tabs {
    flex: 0 0 29px;
    height: 29px;
    gap: 0;
    margin: 0 0 10px;
    border-bottom: 1px solid #edf0f5;
}

.documents-tabs button {
    display: block;
    width: auto;
    height: 29px;
    min-height: 0;
    margin: 0;
    padding: 0 10px 6px;
    border-radius: 0;
    background: transparent;
    color: #48536b;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.documents-tabs button.is-active::after {
    right: 10px;
    left: 10px;
    height: 2px;
}

.documents-notice {
    display: none !important;
}

.documents-overview-grid {
    grid-template-columns: minmax(245px, 1fr) minmax(0, 1.87fr);
    grid-template-rows: 68px auto;
    align-content: start;
    gap: 12px;
    height: auto;
    min-height: 0;
}

.documents-ai-banner {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 145px;
    min-width: 0;
    min-height: 145px;
    padding: 15px 16px;
    border-radius: 7px;
}

.documents-ai-banner h2 {
    max-width: 210px;
    margin: 2px 0 5px;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
}

.documents-ai-banner p {
    max-width: 220px;
    margin: 0 0 8px;
    color: rgba(255,255,255,.92);
    font-size: 8px;
    line-height: 1.4;
}

.documents-ai-banner button {
    min-height: 25px;
    margin: 0;
    padding: 5px 9px;
    border-radius: 15px;
    background: #fff;
    color: #4b3dc1;
    font-size: 8px;
    line-height: 1;
}

.documents-banner-mark {
    position: relative;
    width: 72px;
    height: 100px;
    flex: 0 0 auto;
    margin-right: 1px;
    border: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
    font-size: 30px;
}

.documents-banner-mark span:first-child {
    position: absolute;
    top: 0;
    right: 6px;
    color: #c5e1ff;
    font-size: 18px;
}

.documents-banner-mark span:nth-child(2) {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    width: 57px;
    height: 64px;
    place-items: center;
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 13px;
    background: linear-gradient(145deg, #f8f7ff, #dce5ff);
    color: #5777db;
    box-shadow: 0 6px 14px rgba(22,42,110,.22);
    font-size: 26px;
    transform: rotate(4deg);
}

.documents-banner-mark i {
    position: absolute;
    right: 55px;
    bottom: 4px;
    color: #ffe083;
    font-size: 13px;
    font-style: normal;
}

.documents-stats {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
}

.documents-stat-card {
    min-width: 0;
    min-height: 68px;
    grid-template-columns: 27px minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: 0 7px;
    padding: 7px 8px;
    border-radius: 7px;
    box-shadow: 0 2px 7px rgba(30, 55, 105, .06);
}

.documents-stat-icon {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    font-size: 12px;
}

.documents-stat-card > span:nth-child(2) {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-stat-card strong {
    grid-column: 2;
    margin-top: 1px;
    font-size: 15px;
    line-height: 1.05;
}

.documents-stat-card small {
    grid-column: 2;
    overflow: hidden;
    color: #8a94a5;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-stat-trend {
    font-weight: 700;
}

.documents-stat-trend.is-positive {
    color: #15a66d;
}

.documents-stat-trend.is-negative {
    color: #e55757;
}

.documents-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.documents-row-actions button {
    display: inline-grid !important;
    width: 15px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 0 !important;
    place-items: center;
    border: 0 !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #76839b !important;
    font-size: 10px !important;
    line-height: 1;
    box-shadow: none !important;
}

.documents-row-actions button:hover {
    background: #f0effb !important;
    color: #5845c7 !important;
}

.documents-recent-card {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 238px;
    height: 238px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 7px 11px 10px;
    border-radius: 7px;
    box-shadow: 0 2px 7px rgba(30, 55, 105, .06);
}

.documents-section-heading {
    min-height: 22px;
    margin-bottom: 6px;
}

.documents-section-heading h2 {
    margin: 0;
    color: #283652;
    font-size: 10px;
}

.documents-section-heading p,
.documents-page-heading p,
.documents-chat-heading p {
    font-size: 8px;
}

.documents-text-button {
    display: inline-flex !important;
    width: auto !important;
    min-height: 22px;
    margin: 0 !important;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    border: 0 !important;
    border-radius: 5px;
    background: transparent !important;
    color: #6350d3 !important;
    box-shadow: none;
    font-size: 8px !important;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.documents-recent-card .documents-table-wrap {
    min-height: 0;
    max-height: 179.6px;
    flex: 1 1 179.6px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 5px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

/* Avoid a subpixel sliver of a sixth row at the scroll boundary. */
.documents-recent-card .documents-table-wrap::after {
    display: block;
    height: 1px;
    content: "";
}

.documents-recent-card .documents-table-wrap::-webkit-scrollbar { width: 6px; }
.documents-recent-card .documents-table-wrap::-webkit-scrollbar-thumb { border-radius: 6px; background: #cbd4e4; }
.documents-recent-card .documents-table-wrap::-webkit-scrollbar-track { background: #f5f7fb; }

.documents-recent-card .documents-table {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 8px;
}

.documents-recent-card .documents-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f8fc;
}

.documents-recent-card .documents-table th:first-child,
.documents-recent-card .documents-table td:first-child {
    width: 41%;
}

.documents-recent-card .documents-table th:nth-child(2),
.documents-recent-card .documents-table td:nth-child(2) {
    width: 10%;
}

.documents-recent-card .documents-table th:nth-child(3),
.documents-recent-card .documents-table td:nth-child(3) {
    width: 16%;
}

.documents-recent-card .documents-table th:nth-child(4),
.documents-recent-card .documents-table td:nth-child(4) {
    width: 18%;
}

.documents-recent-card .documents-table th:nth-child(5),
.documents-recent-card .documents-table td:nth-child(5) {
    width: 15%;
    text-align: center;
}

.documents-recent-card .documents-table th,
.documents-recent-card .documents-table td {
    height: 24px;
    max-height: 24px;
    padding: 4px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.documents-recent-card .documents-table th:first-child,
.documents-recent-card .documents-table td:first-child {
    width: 41%;
}

.documents-recent-card .documents-table th:nth-child(2),
.documents-recent-card .documents-table td:nth-child(2) {
    display: table-cell;
    width: 10%;
}

.documents-recent-card .documents-table th:nth-child(3),
.documents-recent-card .documents-table td:nth-child(3) {
    width: 16%;
}

.documents-recent-card .documents-table th:nth-child(4),
.documents-recent-card .documents-table td:nth-child(4) {
    display: table-cell;
    width: 18%;
}

.documents-recent-card .documents-table th:nth-child(5),
.documents-recent-card .documents-table td:nth-child(5) {
    width: 15%;
    text-align: center;
}

.documents-recent-card .documents-table th:nth-child(5) {
    overflow: visible;
    padding-right: 1px;
    padding-left: 1px;
    font-size: 7px;
    text-overflow: clip;
}

.documents-recent-card .documents-table td:first-child {
    max-width: none;
    white-space: nowrap;
}

.documents-recent-card .documents-row-title {
    display: flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.documents-recent-card .documents-row-title > span:last-child {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-recent-card .documents-file-badge {
    width: 20px;
    height: 22px;
    font-size: 7px;
}

.documents-recent-card .documents-status {
    max-width: 100%;
    overflow: hidden;
    padding: 3px 4px;
    font-size: 7px;
    text-overflow: ellipsis;
}

.documents-overview-card {
    min-width: 0;
    min-height: 145px;
    padding: 11px 12px;
    border: 1px solid #e5eaf3;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(30, 55, 105, .06);
}

.documents-reference-previews {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.documents-reference-card {
    min-width: 0;
    height: 184px;
    overflow: hidden;
    border: 1px solid #e5eaf3;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(30, 55, 105, .06);
}

.documents-reference-open {
    display: flex !important;
    width: 100% !important;
    height: 100%;
    flex-direction: column;
    gap: 7px;
    padding: 9px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #293752 !important;
    text-align: left;
}

.documents-reference-open:hover {
    background: #fcfcff !important;
}

.documents-reference-heading {
    display: flex;
    min-width: 0;
    min-height: 15px;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.documents-reference-heading strong {
    overflow: hidden;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-reference-heading > span {
    color: #6754dc;
    font-size: 10px;
}

.documents-upload-preview,
.documents-assistant-preview,
.documents-list-preview {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.documents-upload-preview {
    gap: 6px;
}

.documents-upload-drop-preview {
    display: flex;
    min-height: 75px;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d9d4f5;
    border-radius: 5px;
    background: #fbfaff;
    color: #53617b;
}

.documents-preview-cloud {
    color: #6451cf;
    font-size: 18px;
    line-height: 1;
}

.documents-upload-drop-preview strong {
    margin-top: 3px;
    font-size: 7px;
}

.documents-upload-drop-preview small {
    margin-top: 2px;
    color: #78849b;
    font-size: 6px;
}

.documents-preview-providers,
.documents-preview-controls,
.documents-preview-tools,
.documents-preview-tabs,
.documents-preview-filters {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.documents-preview-providers span {
    overflow: hidden;
    padding: 3px 4px;
    border: 1px solid #edf0f6;
    border-radius: 8px;
    color: #68758d;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-controls {
    font-size: 7px;
}

.documents-preview-controls > span {
    padding: 4px 8px;
    border: 1px solid #e5eaf3;
    border-radius: 4px;
    color: #68758d;
}

.documents-preview-controls strong {
    padding: 5px 9px;
    border-radius: 4px;
    background: #6249d2;
    color: #fff;
    font-weight: 600;
}

.documents-assistant-preview {
    gap: 5px;
}

.documents-preview-user-message,
.documents-preview-assistant-message {
    display: block;
    max-width: 88%;
    overflow: hidden;
    border-radius: 5px;
    font-size: 6px;
    line-height: 1.35;
}

.documents-preview-user-message {
    align-self: flex-end;
    padding: 5px 6px;
    background: #f0edff;
    color: #5142aa;
}

.documents-preview-assistant-message {
    padding: 5px 6px;
    background: #f4f7fc;
    color: #35435c;
}

.documents-preview-assistant-message > strong,
.documents-preview-assistant-message > small,
.documents-preview-assistant-message > span,
.documents-preview-assistant-message > span small {
    display: block;
}

.documents-preview-assistant-message > small {
    margin-top: 2px;
    color: #68758d;
}

.documents-preview-assistant-message > span {
    margin-top: 4px;
    padding: 4px;
    border: 1px solid #e2e8f4;
    border-radius: 4px;
    background: #fff;
    font-weight: 600;
}

.documents-preview-assistant-message > span small {
    margin-top: 2px;
    color: #7c879b;
    font-weight: 400;
}

.documents-preview-tools span {
    overflow: hidden;
    color: #6152bf;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-composer {
    display: flex;
    min-height: 19px;
    align-items: center;
    justify-content: space-between;
    padding: 3px 5px;
    border: 1px solid #e5eaf3;
    border-radius: 10px;
    color: #8993a5;
    font-size: 6px;
}

.documents-preview-composer strong {
    display: grid;
    width: 14px;
    height: 14px;
    place-items: center;
    border-radius: 50%;
    background: #6249d2;
    color: #fff;
    font-size: 7px;
}

.documents-list-preview {
    gap: 5px;
}

.documents-preview-tabs {
    justify-content: flex-start;
    gap: 9px;
    border-bottom: 1px solid #edf0f6;
}

.documents-preview-tabs span,
.documents-preview-tabs b {
    padding-bottom: 4px;
    color: #68758d;
    font-size: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.documents-preview-tabs b {
    border-bottom: 1px solid #6754dc;
    color: #6754dc;
    font-weight: 650;
}

.documents-preview-filters span {
    min-width: 0;
    overflow: hidden;
    padding: 3px 4px;
    border: 1px solid #e7ebf3;
    border-radius: 4px;
    color: #68758d;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-table-head,
.documents-preview-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, .8fr) 22px;
    align-items: center;
    gap: 3px;
}

.documents-preview-table-head {
    padding: 3px 2px;
    border-bottom: 1px solid #e9edf4;
    color: #69758b;
    font-size: 6px;
    font-weight: 600;
}

.documents-preview-table-body {
    display: grid;
    gap: 2px;
}

.documents-preview-row {
    min-height: 18px;
    padding: 2px;
    border-bottom: 1px solid #f0f2f6;
    color: #34425c;
    font-size: 6px;
}

.documents-preview-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-file {
    display: inline-grid;
    width: 10px;
    height: 12px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 2px;
    background: #fff0ef;
    color: #dc5555;
    font-size: 4px;
    font-weight: 700;
}

.documents-preview-status {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 2px 3px;
    border-radius: 8px;
    background: #f0f3f8;
    color: #53627a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-status.is-green { background: #e7f8ee; color: #14834f; }
.documents-preview-status.is-blue { background: #ebf2ff; color: #3e64b8; }
.documents-preview-status.is-amber { background: #fff5df; color: #a56a00; }
.documents-preview-status.is-red { background: #ffeded; color: #b42318; }

.documents-preview-date {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-preview-actions {
    color: #596a8a;
    text-align: center;
}

.documents-preview-empty {
    padding: 8px 2px;
    color: #78849b;
    font-size: 7px;
}

.documents-quick-actions {
    grid-column: 1;
    grid-row: 2;
    min-height: 145px;
    margin-top: 77px;
}

.documents-overview-card .documents-section-heading {
    min-height: 25px;
    margin: 0 0 7px;
}

.documents-overview-card .documents-section-heading p {
    margin: 3px 0 0;
    color: #78849b;
    font-size: 7px;
    line-height: 1.35;
}

.documents-quick-action-list {
    display: grid;
    gap: 5px;
}

.documents-quick-action-list > button {
    display: grid !important;
    width: 100% !important;
    min-height: 29px !important;
    grid-template-columns: 23px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 7px;
    padding: 4px 7px !important;
    border: 1px solid #edf0f6 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #293752 !important;
    text-align: left;
}

.documents-quick-action-list > button:hover {
    border-color: #d8d2fb !important;
    background: #faf9ff !important;
}

.documents-action-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
}

.documents-action-icon.is-purple { background: #f0edff; color: #6451cf; }
.documents-action-icon.is-blue { background: #eaf3ff; color: #3d72bd; }
.documents-action-icon.is-amber { background: #fff5df; color: #a56a00; }

.documents-quick-action-list strong,
.documents-quick-action-list small {
    display: block;
    overflow: hidden;
    color: #293752;
    font-size: 8px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-quick-action-list small {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: #78849b;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-action-arrow {
    color: #7a70ca;
    font-size: 10px;
    text-align: center;
}

.documents-table th {
    height: 28px;
    padding: 6px 7px;
    font-size: 7.5px;
}

.documents-table td {
    height: 34px;
    max-height: 34px;
    padding: 6px 7px;
    font-size: 8.5px;
}

.documents-row-open {
    display: inline-flex !important;
    width: auto !important;
    min-height: 21px !important;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
    padding: 3px 7px !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #4b54a3 !important;
    box-shadow: none !important;
    font-size: 8px !important;
    line-height: 1;
    white-space: nowrap;
}

body:has(.documents-screen:not(.hidden)) .corner-brand-logo,
body:has(.documents-screen:not(.hidden)) .menu-button,
body:has(.documents-screen:not(.hidden)) .notification-bell,
body:has(.documents-screen:not(.hidden)) .sidebar {
    display: none !important;
}

.documents-notice:not(.hidden) {
    display: block !important;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 10px;
}

#documentsScreen.screen {
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.documents-screen button {
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    font-family: inherit;
    letter-spacing: normal;
    box-shadow: none;
    transition: background-color .15s ease, color .15s ease;
}

.documents-screen button::before {
    display: none !important;
}

.documents-screen button:hover:not(:disabled) {
    box-shadow: none;
    filter: none;
    transform: none;
}

.documents-panel[data-docs-panel="overview"] {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.documents-overview-grid {
    display: grid;
}

.documents-stats {
    display: grid;
}

.documents-panel:not([data-docs-panel="overview"]) {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.documents-back-button {
    display: inline-flex !important;
    min-height: 18px !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    align-items: center;
    border: 0 !important;
    background: transparent !important;
    color: #78849b !important;
    font-size: 8px !important;
    font-weight: 600;
}

.documents-back-button:hover {
    color: #5949ca !important;
}

.documents-assistant-layout {
    min-height: 0;
    grid-template-columns: minmax(175px, .75fr) minmax(0, 1.8fr);
    gap: 10px;
}

.documents-history,
.documents-chat {
    min-height: 0;
    border-radius: 8px;
    box-shadow: none;
}

.documents-history {
    padding: 12px;
}

.documents-history .documents-section-heading {
    align-items: flex-start;
}

.documents-history .documents-section-heading h2,
.documents-chat-heading h2 {
    font-size: 13px;
}

.documents-history .documents-section-heading button {
    width: 23px;
    height: 23px;
    min-height: 23px;
    padding: 0;
    border: 1px solid #e8ebf3;
    border-radius: 6px;
    background: #fff;
    color: #5949ca;
    font-size: 15px;
}

.documents-chat {
    padding: 14px;
}

.documents-prompt-chips {
    gap: 5px;
    margin: 2px 0 8px;
}

.documents-prompt-chips button {
    padding: 5px 7px;
    font-size: 8px;
}

.documents-chat-messages {
    min-height: 180px;
    padding: 10px 4px;
}

.documents-chat-message {
    padding: 9px 10px;
    font-size: 10px;
}

.documents-composer textarea,
.documents-composer button {
    min-height: 36px;
    font-size: 10px;
}

.documents-page-heading h2 {
    margin: 0 0 3px;
    font-size: 16px;
}

.documents-upload-heading {
    align-items: flex-start;
    justify-content: flex-start;
}

.documents-drop-zone {
    min-height: 195px;
    border: 1px dashed #9b8bea;
    border-radius: 8px;
    background: #fbfaff;
    box-shadow: none;
}

.documents-drop-zone p small {
    color: #8b95a8;
    font-size: 8px;
}

.documents-upload-providers {
    display: flex;
    gap: 8px;
    margin-top: 9px;
}

.documents-upload-providers span {
    padding: 5px 9px;
    border: 1px solid #e8ebf3;
    border-radius: 6px;
    background: #fff;
    color: #5d6880;
    font-size: 8px;
}

.documents-upload-controls {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 10px;
}

.documents-upload-controls label {
    width: min(185px, 100%);
    font-size: 9px;
}

.documents-upload-controls select,
.documents-upload-controls input,
.documents-list-toolbar input,
.documents-list-toolbar select {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
}

.documents-upload-controls > button,
.documents-upload-controls > button:not(.documents-secondary-button) {
    min-height: 31px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 9px;
}

.documents-list-heading {
    align-items: flex-start;
}

.documents-export-button {
    min-height: 30px !important;
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #5a45d0 !important;
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 650;
}

.documents-list-tabs {
    display: flex;
    gap: 17px;
    margin: 8px 0 10px;
    border-bottom: 1px solid #edf0f5;
}

.documents-list-tabs button {
    position: relative;
    min-height: 28px !important;
    padding: 0 2px 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #707c91 !important;
    font-size: 9px !important;
}

.documents-list-tabs button.is-active {
    color: #5846ce !important;
}

.documents-list-tabs button.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: #6754dc;
    content: "";
}

.documents-list-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(110px, 1fr));
    gap: 7px;
    margin-bottom: 10px;
}

.documents-list-toolbar label {
    min-width: 0;
}

.documents-list-toolbar input,
.documents-list-toolbar select {
    width: 100%;
    border: 1px solid #e4e8f0;
    background: #fff;
    color: #53617b;
}

.documents-panel[data-docs-panel="list"] > .documents-table-wrap {
    overflow: auto;
    border-radius: 7px;
    box-shadow: none;
}

.documents-panel[data-docs-panel="list"] .documents-table {
    table-layout: auto;
    font-size: 9px;
}

.documents-panel[data-docs-panel="list"] .documents-table th,
.documents-panel[data-docs-panel="list"] .documents-table td {
    height: 36px;
    padding: 7px 9px;
    font-size: 9px;
}

@media (max-width: 760px) {
    #documentsScreen.screen {
        inset: 0;
        width: 100%;
        max-width: none;
        max-height: none;
        grid-template-columns: 90px minmax(0, 1fr);
        border-radius: 0;
        padding: 0;
    }

    .documents-side-nav { padding-inline: 5px; }
    .documents-side-nav nav button { justify-content: flex-start; font-size: 7px; }
    .documents-main { padding: 12px; }
    .documents-header {
        flex: 0 0 49px;
        height: 49px;
        align-items: flex-start;
        flex-direction: row;
    }

    .documents-overview-grid {
        grid-template-columns: minmax(150px, .9fr) minmax(0, 1.1fr);
        grid-template-rows: 74px 95px;
    }

    .documents-reference-previews {
        grid-template-columns: 1fr;
    }

    .documents-quick-actions {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 0;
    }

    .documents-stats {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .documents-ai-banner { height: 145px; min-height: 145px; padding: 11px; }
    .documents-ai-banner h2 { font-size: 12px; }
    .documents-banner-mark { width: 52px; }
    .documents-banner-mark span:nth-child(2) { width: 38px; height: 46px; }
    .documents-recent-card { grid-column: 2; grid-row: 2; height: 238px; min-height: 238px; padding: 7px; }

    .documents-assistant-layout {
        grid-template-columns: 1fr;
    }

    .documents-history {
        max-height: 170px;
        overflow: auto;
    }

    .documents-chat {
        min-height: 500px;
        padding: 14px;
    }

    .documents-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .documents-search {
        width: 100%;
    }

    .documents-table {
        min-width: 650px;
    }

    .documents-list-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .documents-editor-actions > button {
        flex: 1 1 42%;
    }
}

@media (max-width: 430px) {
    .documents-stats {
        grid-template-columns: 1fr 1fr;
    }

    .documents-stat-card {
        min-height: 76px;
        padding: 10px;
    }

    .documents-stat-card > span:nth-child(2) {
        font-size: 10px;
    }

    .documents-ai-banner {
        padding: 19px;
    }

    .documents-banner-mark {
        width: 46px;
        height: 46px;
        margin-right: 0;
        border-radius: 14px;
        font-size: 24px;
    }

    .documents-form-grid {
        grid-template-columns: 1fr;
    }

    .documents-composer {
        align-items: stretch;
        flex-direction: column;
    }

    .documents-composer button {
        align-self: flex-end;
    }
}

.documents-assistant-actions {
    align-items: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.documents-ai-title-label {
    width: min(125px, 100%);
    gap: 4px;
    font-size: 8px;
}

.documents-ai-title-label input {
    min-height: 29px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
}

.documents-assistant-actions > button {
    display: inline-flex !important;
    min-height: 29px !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 6px 9px !important;
    border: 1px solid #e3e7f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #53617b !important;
    font-size: 9px !important;
    font-weight: 650;
    line-height: 1.15;
    box-shadow: none !important;
}

.documents-assistant-actions > #documentsSaveAiDraft {
    border-color: #5b47d2 !important;
    background: #5b47d2 !important;
    color: #fff !important;
}

.documents-conversation-button {
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 9px;
}

.documents-composer {
    align-items: stretch;
    gap: 7px;
    margin-top: 8px;
}

.documents-composer textarea {
    min-height: 35px;
    padding: 8px 9px;
    border-radius: 6px;
    font-size: 9px;
}

.documents-composer button {
    box-sizing: border-box;
    width: auto;
    min-width: 82px;
    height: 35px;
    min-height: 35px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
}
