/* ========================================================================== */
/*                     SUPERCHAT — PREMIUM AI CHAT INTERFACE                  */
/* ========================================================================== */

/* --- Layout Fullscreen --- */
.ai-chat-body {
    display: flex !important;
    flex-direction: row !important;
    height: 100vh;
    overflow: hidden;
    background: #09090B;
}

.ai-chat-body header,
.ai-chat-body footer,
.ai-chat-body .unified-footer,
.ai-chat-body .page-loader {
    display: none !important;
}

/* ========================================================================== */
/*                              SIDEBAR                                       */
/* ========================================================================== */

.sc-sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    background: rgba(15, 15, 18, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    z-index: 50;
    backdrop-filter: blur(20px);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.sc-sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex-basis: 0 !important;
    border-right: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateX(-100%);
}

.sc-sidebar-header {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #FAFAFA;
}

.sc-brand i {
    color: #5865F2;
    font-size: 1.3rem;
    /* filter removido a pedido do usuário */
}

.sc-sidebar-close {
    display: none !important;
    background: none;
    border: none;
    color: #71717A;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sc-sidebar-close:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

/* New Chat Button */
.sc-new-chat-btn {
    margin: 0.75rem 1rem;
    padding: 0.7rem 1rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px dashed rgba(88, 101, 242, 0.3);
    border-radius: 10px;
    color: #A1A1AA;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
}

.sc-new-chat-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    color: #FAFAFA;
}

.sc-new-chat-btn i {
    font-size: 0.8rem;
}

/* Conversations List */
.sc-conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.6rem;
}

.sc-conv-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #52525B;
    padding: 0.5rem 0.6rem;
    margin-top: 0.3rem;
}

.sc-conv-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: #A1A1AA;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.sc-conv-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FAFAFA;
}

.sc-conv-item.active {
    background: rgba(88, 101, 242, 0.15);
    color: #FAFAFA;
}

.sc-conv-item .sc-conv-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-conv-item .sc-conv-actions {
    display: none;
    gap: 0.3rem;
}

.sc-conv-item:hover .sc-conv-actions {
    display: flex;
}

.sc-conv-action-btn {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.sc-conv-action-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.1);
}

.sc-conv-action-btn.delete:hover {
    color: #F43F5E;
}

/* Sidebar Footer */
.sc-sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sc-credits-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: rgba(88, 101, 242, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #A1A1AA;
}

.sc-credits-display i {
    color: #F59E0B;
}

.sc-credits-display #sc-credits-count {
    color: #FAFAFA;
    font-weight: 700;
}

.sc-credits-display .sc-credits-label {
    color: #71717A;
    font-size: 0.75rem;
}

.sc-user-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #A1A1AA;
}

.sc-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #52525B;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sc-back-link:hover {
    color: #A1A1AA;
    background: rgba(255, 255, 255, 0.03);
}

/* Overlay */
.sc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 40;
    backdrop-filter: blur(4px);
}

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

/* ========================================================================== */
/*                              MAIN AREA                                     */
/* ========================================================================== */

.sc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 0;
    position: relative;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Bar */
.sc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 52px;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    z-index: 500;
}

.sc-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
}

.sc-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #A1A1AA;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sc-menu-toggle:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-sidebar.collapsed~.sc-main .sc-menu-toggle {
    display: block !important;
}

/* Model Selector */
.sc-model-selector,
.sc-persona-selector {
    position: relative;
    display: inline-block;
}

.sc-model-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: #FAFAFA;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-model-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.sc-model-btn i.fa-chevron-down {
    font-size: 0.7rem;
    color: #71717A;
    transition: transform 0.2s;
}

.sc-model-btn.open i.fa-chevron-down {
    transform: rotate(180deg);
}

.sc-model-dropdown {
    display: none;
    position: fixed;
    transform: none;
    width: 380px;
    max-height: 480px;
    background: rgba(18, 18, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    z-index: 100005;
    overflow: hidden;
    flex-direction: column;
    animation: dropdownIn 0.2s ease;
}

.sc-model-dropdown.open {
    display: flex;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.sc-model-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-model-search i {
    color: #52525B;
    font-size: 0.85rem;
}

.sc-model-search input {
    flex: 1;
    background: none;
    border: none !important;
    color: #FAFAFA;
    font-size: 0.85rem;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
}

.sc-model-search input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.sc-model-search input::placeholder {
    color: #52525B;
}

.sc-model-filters-bar {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 0.6rem !important;
}

.sc-model-categories {
    display: flex;
    gap: 0.4rem;
    padding-right: 42px;
    overflow-x: auto;
}

.sc-model-cost-guide {
    position: absolute;
    top: 0.68rem;
    right: 1rem;
    z-index: 2;
}

.sc-model-cost-info-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: #b9c4d4;
    background: #151a22;
    cursor: pointer;
}

.sc-model-cost-info-btn:hover,
.sc-model-cost-info-btn:focus-visible,
.sc-model-cost-info-btn[aria-expanded="true"] {
    border-color: #64748b;
    color: #f4f7fb;
    background: #202733;
}

.sc-model-cost-info-btn:focus-visible {
    outline: 2px solid #93a4ba;
    outline-offset: 2px;
}

.sc-model-cost-info {
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #aab3c0;
    background: #11161d;
    font-size: 0.7rem;
    line-height: 1.45;
}

.sc-model-cost-info[hidden] {
    display: none;
}

.sc-model-cost-info strong {
    color: #f1f5f9;
    font-size: 0.75rem;
}

.sc-model-cost-info p {
    margin: 0.35rem 0 0;
}

.sc-model-cost-info ul {
    display: grid;
    gap: 0.25rem;
    margin: 0.55rem 0 0;
    padding-left: 1rem;
}

.sc-model-cost-info b {
    color: #d7dee8;
}

.sc-model-cost-info .sc-model-cost-note {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #8793a3;
}

.sc-model-filters-bar>div:last-child {
    display: flex !important;
    width: 100% !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
}

.sc-model-provider-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(20, 20, 25, 0.95);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #A1A1AA;
    border-radius: 8px;
    padding: 0.45rem 1.6rem 0.45rem 0.6rem !important;
    font-size: 0.7rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em !important;
    outline: none;
    cursor: pointer;
    flex: 1 !important;
    width: 50% !important;
    max-width: none !important;
    text-overflow: ellipsis;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sc-model-provider-select:hover,
.sc-model-provider-select:focus {
    background-color: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.4);
    color: #FAFAFA;
}

.sc-model-provider-select option {
    background: #121214;
    color: #D4D4D8;
    padding: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
}

.sc-cat-pill {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #71717A;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.sc-cat-pill:hover {
    color: #A1A1AA;
    border-color: rgba(255, 255, 255, 0.15);
}

.sc-cat-pill.active {
    background: rgba(88, 101, 242, 0.15);
    color: #7983F5;
    border-color: rgba(88, 101, 242, 0.3);
}

.sc-model-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 360px;
    padding: 0.4rem;
}

.sc-model-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #A1A1AA;
    font-size: 0.82rem;
}

.sc-model-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FAFAFA;
}

.sc-model-option.active {
    background: rgba(88, 101, 242, 0.12);
    color: #FAFAFA;
}

.sc-model-option .sc-mo-icon {
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
    color: #5865F2;
}

.sc-model-icon {
    color: #5865F2;
    display: flex;
    align-items: center;
}

.sc-model-option .sc-mo-icon i,
.sc-model-icon i,
.sc-conv-item>span:first-child i {
    color: inherit;
    font-size: 0.95rem;
}

.sc-model-option .sc-mo-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.sc-model-option .sc-mo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
    gap: 0.5rem;
}

.sc-model-option .sc-mo-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #FAFAFA;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    line-height: 1.25;
    flex: 1;
}

.sc-model-option .sc-mo-provider {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7983F5;
}

.sc-model-option .sc-mo-desc {
    font-size: 0.72rem;
    color: #A1A1AA;
    line-height: 1.3;
    margin-top: 0.1rem;
}

.sc-model-option .sc-mo-tier {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.sc-model-option .sc-mo-cost {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.sc-model-option .sc-mo-cost i {
    font-size: 0.6rem;
    color: #F59E0B;
}

.sc-model-option .sc-mo-cost.is-variable {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(51, 65, 85, 0.35);
}

.sc-model-option .sc-mo-cost.is-variable i {
    color: #94a3b8;
}

/* Account entry and profile panel */
.sc-sidebar-footer .sc-user-pill {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--jh-border, #252d38);
    border-radius: 10px;
    color: var(--jh-text, #e7ecf3);
    background: var(--jh-surface, #11161d);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sc-sidebar-footer .sc-user-pill:hover {
    border-color: var(--jh-border-strong, #3b4654);
    background: var(--jh-surface-hover, #171e27);
}

.sc-sidebar-footer .sc-user-pill:focus-visible {
    outline: 2px solid #93a4ba;
    outline-offset: 2px;
}

.sc-sidebar-footer .sc-user-avatar {
    width: 38px;
    height: 38px;
}

.sc-user-account-copy,
.sc-user-account-side {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.sc-user-account-copy {
    gap: 3px;
}

.sc-user-account-copy strong {
    overflow: hidden;
    color: var(--jh-text, #eef2f7);
    font-size: 0.82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-user-account-copy small {
    overflow: hidden;
    color: var(--jh-muted, #8893a1);
    font-size: 0.67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-user-account-side {
    align-items: flex-end;
    gap: 5px;
}

.sc-user-pill .sc-credits-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px !important;
    border-radius: 9999px !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08)) !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sc-user-pill:hover .sc-credits-display {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15)) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.sc-user-pill .sc-credits-display i {
    color: #f59e0b;
    font-size: 0.72rem;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.45));
}

.sc-user-pill .sc-credits-display #sc-credits-count {
    color: #fef3c7;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.sc-user-pill .sc-credits-label {
    display: none;
}

.sc-user-pill .sc-credits-display.sc-credits-exhausted {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

.sc-user-pill .sc-credits-display.sc-credits-exhausted i,
.sc-user-pill .sc-credits-display.sc-credits-exhausted #sc-credits-count {
    color: #f87171 !important;
    filter: none;
}

.sc-user-open-label {
    color: var(--jh-muted, #8893a1);
    font-size: 0.62rem;
    white-space: nowrap;
}

.sc-user-open-label i {
    margin-left: 2px;
    font-size: 0.55rem;
}

.sc-profile-container.sc-modal-container {
    width: min(92vw, 460px);
    max-width: 460px !important;
}

.sc-profile-heading-copy {
    margin: 4px 0 0;
    color: var(--jh-muted, #8893a1);
    font-size: 0.72rem;
    font-weight: 400;
}

.sc-profile-container .sc-profile-body {
    gap: 18px;
}

.sc-profile-container .sc-profile-card {
    gap: 14px;
    padding-bottom: 16px;
    border-color: var(--jh-border, #252d38);
}

.sc-profile-container .sc-profile-avatar-large {
    width: 60px;
    height: 60px;
    border: 1px solid var(--jh-border-strong, #3b4654);
    box-shadow: none;
}

.sc-profile-container .sc-profile-stats {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--jh-border, #252d38);
    border-radius: 10px;
}

.sc-profile-container .sc-profile-stat-box {
    min-width: 0;
    padding: 14px 12px;
    border: 0;
    border-radius: 0;
    background: var(--jh-surface, #11161d);
}

.sc-profile-container .sc-profile-stat-box + .sc-profile-stat-box {
    border-left: 1px solid var(--jh-border, #252d38);
}

.sc-profile-container .sc-profile-stat-val {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-profile-container .sc-profile-action-item {
    min-height: 58px;
    padding: 10px 12px;
    border-color: var(--jh-border, #252d38);
    border-radius: 9px;
    background: transparent;
}

.sc-profile-container .sc-profile-action-item:hover,
.sc-profile-container .sc-profile-action-item:focus-visible {
    border-color: var(--jh-border-strong, #3b4654);
    color: var(--jh-text, #eef2f7);
    background: var(--jh-surface, #11161d);
}

.sc-profile-container .sc-profile-action-item:focus-visible {
    outline: 2px solid #93a4ba;
    outline-offset: 2px;
}

.sc-profile-container .sc-profile-action-primary {
    border-color: rgba(214, 168, 74, 0.38);
    background: rgba(214, 168, 74, 0.07);
}

.sc-profile-container .sc-profile-action-primary > i:first-child {
    color: #d6a84a;
}

.sc-profile-action-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.sc-profile-action-copy strong {
    color: var(--jh-text, #eef2f7);
    font-size: 0.82rem;
}

.sc-profile-action-copy small {
    color: var(--jh-muted, #8893a1);
    font-size: 0.68rem;
    font-weight: 400;
}

.sc-profile-actions .sc-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e98181;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    font-family: inherit;
    text-decoration: none;
}

@media (max-width: 420px) {
    .sc-profile-container .sc-profile-stats {
        grid-template-columns: 1fr;
    }

    .sc-profile-container .sc-profile-stat-box + .sc-profile-stat-box {
        border-top: 1px solid var(--jh-border, #252d38);
        border-left: 0;
    }
}

.sc-mo-tier.free {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.sc-mo-tier.bronze {
    background: rgba(168, 124, 92, 0.15);
    color: #A87C5C;
}

.sc-mo-tier.silver {
    background: rgba(156, 163, 175, 0.15);
    color: #9CA3AF;
}

.sc-mo-tier.gold {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.sc-mo-tier.diamond {
    background: rgba(6, 182, 212, 0.15);
    color: #06B6D4;
}

.sc-mo-tier.absolute {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
}

.sc-mo-tier.thinking {
    background: rgba(88, 101, 242, 0.12);
    color: #7983F5;
    border: 1px solid rgba(88, 101, 242, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sc-mo-tier.deep-research-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sc-mo-tier.vision-badge {
    background: rgba(14, 165, 233, 0.12);
    color: #0EA5E9;
    border: 1px solid rgba(14, 165, 233, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sc-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sc-credits-mini {
    display: none !important;
}

.sc-credits-mini i {
    color: #F59E0B;
    font-size: 0.75rem;
}

/* ========================================================================== */
/*                           MESSAGES AREA                                    */
/* ========================================================================== */

.sc-messages-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Welcome Screen */
.sc-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    gap: 1rem;
}

.sc-welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(168, 85, 247, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #5865F2;
    animation: welcomePulse 3s ease-in-out infinite;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

@keyframes welcomePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.sc-welcome-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #FAFAFA, #A1A1AA);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sc-welcome-subtitle {
    font-size: 0.95rem;
    color: #71717A;
    max-width: 440px;
    line-height: 1.6;
}

.sc-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 1rem;
    max-width: 600px;
    width: 100%;
}

.sc-suggestion-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(88, 101, 242, 0.15);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    color: #A1A1AA;
    font-size: 0.82rem;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sc-suggestion-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.sc-suggestion-card:hover {
    transform: translateY(-3px);
    border-color: rgba(88, 101, 242, 0.5);
    color: #FAFAFA;
    /* box-shadow neon removido */
}

.sc-suggestion-card:hover::before {
    opacity: 1;
}

.sc-suggestion-card>* {
    position: relative;
    z-index: 1;
}

.sc-suggestion-card i {
    color: #5865F2;
    font-size: 0.9rem;
    margin-top: 0.15rem;
    min-width: 16px;
}

/* Messages */
.sc-messages {
    display: none;
    flex-direction: column;
    padding: 1rem 0;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

.sc-messages.active {
    display: flex;
}

.sc-message {
    padding: 1rem 1.5rem;
    animation: msgFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, transform;
}

@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.995);
    }

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



.sc-message-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.sc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sc-msg-avatar.user {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
}

.sc-msg-avatar.assistant {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(88, 101, 242, 0.2));
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sc-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sc-msg-role {
    font-size: 0.82rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-msg-model {
    font-size: 0.7rem;
    color: #52525B;
    margin-left: auto;
}

.sc-msg-tokens {
    font-size: 0.68rem;
    font-weight: 500;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
    cursor: help;
    transition: all 0.2s ease;
    user-select: none;
}

.sc-msg-tokens:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.25);
    transform: translateY(-1px);
}

.sc-msg-tokens i {
    font-size: 0.62rem;
    color: #38bdf8;
}

.sc-tokens-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e4e4e7;
    background: rgba(18, 20, 29, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: help;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    user-select: none;
}

.sc-tokens-mini:hover {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.sc-tokens-mini i {
    color: #818cf8;
    font-size: 0.72rem;
}

.sc-message-content {
    padding-left: 2.4rem;
    color: #D4D4D8;
    font-size: 0.92rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- Markdown Rendered Styles --- */
.sc-message-content h1,
.sc-message-content h2,
.sc-message-content h3,
.sc-message-content h4,
.sc-message-content h5,
.sc-message-content h6 {
    color: #FAFAFA;
    margin: 1.2rem 0 0.6rem;
    line-height: 1.3;
}

.sc-message-content h1 {
    font-size: 1.4rem;
}

.sc-message-content h2 {
    font-size: 1.2rem;
}

.sc-message-content h3 {
    font-size: 1.05rem;
}

.sc-message-content p {
    margin: 0.5rem 0;
}

.sc-message-content a {
    color: #7983F5;
    text-decoration: underline;
}

.sc-message-content strong {
    color: #FAFAFA;
    font-weight: 700;
}

.sc-message-content em {
    color: #D4D4D8;
}

.sc-message-content ul,
.sc-message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.sc-message-content li {
    margin: 0.3rem 0;
}

.sc-message-content blockquote {
    border-left: 3px solid #5865F2;
    padding: 0.5rem 1rem;
    margin: 0.7rem 0;
    background: rgba(88, 101, 242, 0.05);
    border-radius: 0 8px 8px 0;
    color: #A1A1AA;
}

.sc-message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.85rem;
}

.sc-message-content th,
.sc-message-content td {
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.sc-message-content th {
    background: rgba(255, 255, 255, 0.04);
    color: #FAFAFA;
    font-weight: 700;
}

.sc-message-content img {
    max-width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: block;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sc-message-content img:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* Code Blocks */
.sc-message-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.85em;
}

.sc-message-content :not(pre)>code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: #F43F5E;
    font-size: 0.85em;
}

.sc-code-block {
    position: relative;
    margin: 0.8rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    color: #71717A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.sc-copy-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.08);
}

.sc-copy-btn.copied {
    color: #10B981;
}

.sc-code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3) !important;
}

.sc-code-block pre code {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Typing Indicator */
.sc-typing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
}

.sc-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5865F2;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.sc-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.sc-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Botão de Preview de Código na Barra Superior do Bloco */
.sc-code-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.sc-code-preview-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.sc-code-preview-btn i {
    font-size: 0.7rem;
    color: #818cf8;
}

/* ========================================================================== */
/*                              INPUT AREA                                    */
/* ========================================================================== */

.sc-input-area {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-sizing: border-box;
}

/* ========================================================================== */
/*                      DIFERENCIAIS PREMIUM (FASE 5)                         */
/* ========================================================================== */

/* Zen Mode Button */
.sc-zen-mode-btn {
    background: none;
    border: none;
    color: #71717A;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sc-zen-mode-btn:hover,
.sc-zen-mode-btn.active {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

/* Zen Mode Rules */
body.zen-mode .sc-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    transform: translateX(-280px);
    border-right-color: transparent !important;
    overflow: hidden;
}

body.zen-mode .sc-topbar {
    border-bottom-color: transparent;
    background: transparent;
    backdrop-filter: none;
}

body.zen-mode .sc-topbar>*:not(.sc-topbar-right) {
    opacity: 0;
    pointer-events: none;
}

body.zen-mode .sc-main {
    transition: all 0.3s ease;
}

body.zen-mode .sc-messages-area {
    width: 100%;
}

body.zen-mode .sc-input-area {
    margin-bottom: 2rem;
}

body.zen-mode .sc-zen-mode-btn {
    color: #5865F2;
    background: rgba(88, 101, 242, 0.1);
}

/* File Attachment */
.sc-attach-btn {
    background: none;
    border: none;
    color: #A1A1AA;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.sc-attach-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.08);
}

.sc-attach-btn.has-file {
    color: #7983F5;
}

.sc-file-preview {
    display: none !important;
}

.sc-fp-icon {
    color: #7983F5;
    font-size: 1.2rem;
}

.sc-fp-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sc-fp-name {
    color: #FAFAFA;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.sc-fp-size {
    color: #A1A1AA;
    font-size: 0.7rem;
}

.sc-fp-remove {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 1rem;
    border-radius: 50%;
    margin-left: 0.4rem;
    transition: all 0.2s;
}

.sc-fp-remove:hover {
    color: #F43F5E;
    background: rgba(244, 63, 94, 0.1);
}

/* Slash Commands Menu */
.sc-slash-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: rgba(18, 18, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    width: 320px;
    max-height: min(420px, 55vh);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100;
    animation: slashMenuIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-slash-menu.active {
    display: flex;
}

@keyframes slashMenuIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.sc-slash-cmd {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: none;
    color: #A1A1AA;
    padding: 0.6rem 0.8rem;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.15s;
}

.sc-slash-cmd:last-child {
    border-bottom: none;
}

.sc-slash-cmd:hover,
.sc-slash-cmd.selected {
    background: rgba(88, 101, 242, 0.15);
    color: #FAFAFA;
}

.sc-slash-cmd i {
    color: #7983F5;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.sc-slash-cmd span {
    font-weight: 700;
    font-family: monospace;
    font-size: 0.85rem;
}

.sc-slash-cmd small {
    color: #71717A;
    font-size: 0.75rem;
    justify-self: end;
}

.sc-slash-cmd:hover small,
.sc-slash-cmd.selected small {
    color: #A1A1AA;
}

/* Generated Images & AI Image Generation Reveal System */
.sc-image-wrapper,
.sc-image-gen-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.85rem 0;
    width: fit-content;
    max-width: 100%;
}

.sc-img-container,
.sc-image-gen-card {
    position: relative;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
    display: block;
    padding: 0;
    margin: 0;
    line-height: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sc-img-container:hover,
.sc-image-gen-card:hover {
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(168, 85, 247, 0.15);
}

.sc-message-content .sc-img-container img,
.sc-message-content .sc-image-gen-card img,
.sc-generated-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 580px;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.sc-img-container:hover .sc-generated-image,
.sc-image-gen-card:hover .sc-generated-image {
    transform: scale(1.008);
}

/* Image generation progress — quiet, informative and lightweight */
.sc-image-wrapper:has(.sc-image-generation-progress),
.sc-image-gen-wrapper:has(.sc-image-generation-progress),
.sc-streaming-image-orb {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sc-img-container:has(.sc-image-generation-progress),
.sc-image-gen-card:has(.sc-image-generation-progress),
.sc-streaming-image-orb .sc-img-container,
.sc-streaming-image-orb .sc-image-gen-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

.sc-image-generation-progress {
    display: grid;
    grid-template-columns: 112px minmax(180px, 1fr);
    align-items: center;
    gap: 1.1rem;
    width: min(430px, calc(100vw - 3rem));
    padding: 0.85rem;
    border: 1px solid #292b31;
    border-radius: 14px;
    background: #111318;
    line-height: 1.35;
    overflow: hidden;
    user-select: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sc-image-generation-progress.fading-out {
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
}

.sc-image-progress-preview {
    position: relative;
    width: 112px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #343740;
    border-radius: 10px;
    background: #171920;
}

.sc-image-progress-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#262932 1px, transparent 1px), linear-gradient(90deg, #262932 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: 0.45;
}

.sc-image-progress-symbol {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8f96a8;
    font-size: 1.55rem;
}

.sc-image-progress-scan {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    height: 1px;
    background: #8b93a7;
    opacity: 0.8;
    animation: sc-image-reveal-scan 2.4s ease-in-out infinite;
}

.sc-image-progress-corners span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: #a5abba;
    border-style: solid;
    opacity: 0.75;
}

.sc-image-progress-corners span:nth-child(1) { top: 7px; left: 7px; border-width: 1px 0 0 1px; }
.sc-image-progress-corners span:nth-child(2) { top: 7px; right: 7px; border-width: 1px 1px 0 0; }
.sc-image-progress-corners span:nth-child(3) { bottom: 7px; right: 7px; border-width: 0 1px 1px 0; }
.sc-image-progress-corners span:nth-child(4) { bottom: 7px; left: 7px; border-width: 0 0 1px 1px; }

.sc-image-progress-copy { display: grid; gap: 0.32rem; color: #f1f2f4; }
.sc-image-progress-copy strong { font-size: 0.92rem; font-weight: 650; }
.sc-image-progress-copy > span { color: #9297a3; font-size: 0.78rem; }

.sc-image-progress-dots::after {
    content: '';
    animation: sc-image-progress-dots 1.6s steps(4, end) infinite;
}

.sc-image-progress-track {
    height: 3px;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #252831;
}

.sc-image-progress-track span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: #858da0;
    animation: sc-image-progress-track 2.2s ease-in-out infinite;
}

@keyframes sc-image-reveal-scan {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(66px); opacity: 0.9; }
}

@keyframes sc-image-progress-track {
    0% { transform: translateX(-110%); }
    55%, 100% { transform: translateX(245%); }
}

@keyframes sc-image-progress-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75%, 100% { content: '...'; }
}

@media (max-width: 520px) {
    .sc-image-generation-progress {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 0.8rem;
        width: min(100%, calc(100vw - 2rem));
    }
    .sc-image-progress-preview { width: 82px; }
    @keyframes sc-image-reveal-scan {
        0%, 100% { transform: translateY(0); opacity: 0.3; }
        50% { transform: translateY(47px); opacity: 0.9; }
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-image-progress-scan,
    .sc-image-progress-track span,
    .sc-image-progress-dots::after {
        animation: none !important;
    }

    .sc-image-progress-dots::after { content: '...'; }
}

.sc-image-generation-failure {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    width: min(520px, 100%);
    margin: 0.8rem 0;
    padding: 0.9rem;
    border: 1px solid #513238;
    border-radius: 12px;
    background: #191416;
    color: #f3f0f1;
}

.sc-image-failure-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #5e3b42;
    border-radius: 9px;
    color: #d88b98;
}

.sc-image-generation-failure strong { display: block; font-size: 0.88rem; }
.sc-image-generation-failure p { margin: 0.2rem 0 0; color: #b8a6aa; font-size: 0.78rem; line-height: 1.45; }

.sc-image-failure-retry {
    min-height: 34px;
    padding: 0.45rem 0.7rem;
    border: 1px solid #5e3b42;
    border-radius: 8px;
    background: #21191c;
    color: #eadde0;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.sc-image-failure-retry:hover { background: #2a1f22; border-color: #79505a; }
.sc-image-failure-retry:focus-visible { outline: 2px solid #d88b98; outline-offset: 2px; }

.sc-image-fallback-notice {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin: 0 0 0.6rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid #343943;
    border-radius: 8px;
    background: #14171c;
    color: #aeb5c2;
    font-size: 0.72rem;
}

.sc-image-attempt-timeline {
    display: grid;
    gap: 0.35rem;
    width: min(100%, 560px);
    margin: 0.65rem 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #2a2d34;
    border-radius: 10px;
    background: #111318;
    color: #aeb4bf;
    font-size: 0.76rem;
}

.sc-image-attempt-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.4;
}

.sc-image-attempt-item.active i { color: #7c8cff; }
.sc-image-attempt-item.failed i { color: #d88b98; }
.sc-image-attempt-timeline.completed .fa-spin { animation: none; }

.sc-streaming-image-orb .sc-image-gen-card {
    flex-direction: column;
    width: min(430px, calc(100vw - 3rem)) !important;
}

.sc-image-model-attempt {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin-top: -1px;
    padding: 0.72rem 0.9rem;
    border: 1px solid #2a2d34;
    border-top-color: #23262d;
    border-radius: 0 0 14px 14px;
    background: #101217;
    line-height: 1.2;
}

.sc-image-gen-card:has(.sc-image-model-attempt) .sc-image-generation-progress {
    border-radius: 14px 14px 0 0;
}

.sc-image-model-indicator {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #1b1f2a;
    color: #8e9aff;
    font-size: 0.75rem;
}

.sc-image-model-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.sc-image-model-copy small {
    color: #777e8c;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.sc-image-model-copy strong {
    overflow: hidden;
    color: #d8dbe2;
    font-size: 0.78rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-image-model-count {
    color: #858c99;
    font-size: 0.69rem;
    white-space: nowrap;
}

.sc-image-model-attempt.failed .sc-image-model-indicator {
    background: #25191d;
    color: #d88b98;
}

@media (max-width: 520px) {
    .sc-streaming-image-orb .sc-image-gen-card {
        width: min(100%, calc(100vw - 2rem)) !important;
    }
}

@media (max-width: 520px) {
    .sc-image-generation-failure { grid-template-columns: auto minmax(0, 1fr); }
    .sc-image-failure-retry { grid-column: 1 / -1; width: 100%; }
}

.sc-expired-image-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.8), rgba(20, 20, 24, 0.9));
    border: 1px dashed rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
    text-align: center;
    color: #a1a1aa;
    max-width: 400px;
}

.sc-expired-image-panel i {
    font-size: 2.5rem;
    color: rgba(167, 139, 250, 0.5);
    margin-bottom: 1rem;
}

.sc-expired-title {
    font-weight: 600;
    color: #e4e4e7;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.sc-expired-desc {
    font-size: 0.85rem;
    line-height: 1.4;
}

.sc-watermark-overlay {
    position: absolute;
    bottom: 14px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    pointer-events: none;
    user-select: none;
    z-index: 10;
    line-height: 1;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
    transition: opacity 0.3s ease;
    opacity: 0.88;
}

.sc-watermark-overlay .sc-wm-crown-icon {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

.sc-watermark-overlay .sc-wm-text {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 2.8px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

.sc-image-actions {
    display: none;
}

.sc-btn-img-download {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(13, 17, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s var(--prompt-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transform: translateY(-4px);
}

.sc-img-container:hover .sc-btn-img-download,
.sc-image-gen-card:hover .sc-btn-img-download,
.sc-img-container.loaded .sc-btn-img-download,
.sc-image-gen-card.loaded .sc-btn-img-download {
    opacity: 1;
    transform: translateY(0);
}

.sc-btn-img-download:hover {
    background: #9333ea;
    border-color: #c084fc;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
    transform: scale(1.08);
}

/* Image Viewer Modal */
.sc-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sc-image-modal.active {
    opacity: 1;
    pointer-events: all;
}

.sc-im-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10000;
}

.sc-im-close:hover {
    background: #EF4444;
}

.sc-im-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.sc-im-wrapper:active {
    cursor: grabbing;
}

.sc-im-container-box {
    position: relative;
    display: inline-block;
    max-width: 90vw;
    max-height: 90vh;
    transition: transform 0.1s ease-out;
    /* suave para zoom */
    transform-origin: center center;
    user-select: none;
}

.sc-im-content {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.sc-im-prevent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.sc-im-prevent-overlay:active {
    cursor: grabbing;
}

.sc-modal-watermark {
    bottom: 28px;
    right: 28px;
    gap: 6px;
    z-index: 3;
    opacity: 0.92;
}

.sc-modal-watermark .sc-wm-crown-icon {
    font-size: 2.5rem;
}

.sc-modal-watermark .sc-wm-text {
    font-size: 1rem;
    letter-spacing: 4px;
}

.sc-im-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 25, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.5rem;
    border-radius: 12px;
    display: flex;
    gap: 0.5rem;
    z-index: 10000;
}

.sc-im-controls button {
    background: transparent;
    border: none;
    color: #C084FC;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.sc-im-controls button:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #E9D5FF;
}

.sc-input-container:focus-within {
    border-color: rgba(88, 101, 242, 0.4);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.sc-input {
    flex: 1;
    background: none !important;
    border: none !important;
    color: #FAFAFA;
    font-size: 0.92rem;
    line-height: 1.5;
    resize: none;
    max-height: 160px;
    padding: 0.3rem 0.4rem !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
}

.sc-input::placeholder {
    color: #52525B;
}

.sc-input-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.sc-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #5865F2;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sc-send-btn:hover:not(:disabled) {
    background: #7983F5;
    transform: scale(1.05);
}

.sc-send-btn:disabled {
    background: #27272A;
    color: #52525B;
    cursor: not-allowed;
}

.sc-stop-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #F43F5E;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
    animation: stopPulse 1.5s infinite;
}

.sc-stop-btn:hover {
    background: #e11d48;
}

@keyframes stopPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(244, 63, 94, 0);
    }
}

.hidden {
    display: none !important;
}

.sc-disclaimer {
    text-align: center;
    font-size: 0.72rem;
    color: #3F3F46;
    margin-top: 0.5rem;
}

/* ========================================================================== */
/*                              RESPONSIVE                                    */
/* ========================================================================== */

@media (max-width: 768px) {
    .sc-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 9999;
        width: 300px;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sc-sidebar.active {
        transform: translateX(0);
    }

    .sc-sidebar-close {
        display: block;
    }

    .sc-menu-toggle {
        display: block;
    }

    /* Topbar adjustments for small screens */
    .sc-topbar {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }

    .sc-topbar-left {
        gap: 0.4rem;
        flex: 1;
        min-width: 0;
    }

    .sc-topbar-right {
        gap: 0.4rem;
        flex-shrink: 0;
    }

    /* Esconder botões não essenciais no cabeçalho mobile */
    #sc-export-notes-btn {
        display: none !important;
    }

    /* Mostrar modo foco no celular */
    .sc-zen-mode-btn {
        display: block !important;
        padding: 0.35rem;
        font-size: 1rem;
    }

    .sc-model-selector,
    .sc-persona-selector {
        min-width: 0;
    }

    .sc-model-btn,
    .sc-persona-btn {
        padding: 0.35rem 0.4rem;
        font-size: 0.78rem;
        gap: 0.25rem;
        min-width: 0;
        /* Permite que o botão encolha */
    }

    .sc-model-btn .sc-model-name {
        max-width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sc-persona-btn .sc-persona-name {
        display: none;
        /* Esconder nome da persona no celular para economizar espaço */
    }

    .sc-credits-mini {
        padding: 0.25rem 0.5rem;
        font-size: 0.72rem;
    }

    /* Dropdowns styling for mobile to prevent overflow/overlap */
    .sc-model-dropdown {
        max-width: 360px;
        transform: none;
        z-index: 100005 !important;
    }

    .sc-persona-dropdown {
        max-width: 290px;
        z-index: 100005 !important;
    }

    /* Filtro de provedor menor no mobile */
    .sc-model-filters-bar {
        padding: 0.4rem 0.6rem;
        gap: 0.35rem;
    }

    .sc-model-provider-select {
        max-width: 110px;
        padding: 0.35rem 1.5rem 0.35rem 0.5rem;
        font-size: 0.65rem;
        background-position: right 6px center;
    }

    .sc-cat-pill {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .sc-suggestions {
        grid-template-columns: 1fr;
    }

    .sc-message {
        padding: 0.8rem 1rem;
    }

    .sc-input-area {
        padding: 0 0.8rem 0.8rem;
    }

    .sc-welcome-title {
        font-size: 1.5rem;
    }

    /* Estilos responsivos para blocos de notas flutuantes no mobile */
    .sc-floating-note {
        max-width: calc(100vw - 20px) !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .sc-topbar {
        padding: 0.4rem 0.5rem;
    }

    .sc-model-btn,
    .sc-persona-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .sc-model-btn .sc-model-name,
    .sc-persona-btn .sc-persona-name {
        max-width: 60px;
    }

    .sc-model-btn i,
    .sc-persona-btn i {
        font-size: 0.65rem;
    }

    .sc-model-dropdown {
        max-width: 320px;
        z-index: 2000;
    }

    .sc-persona-dropdown {
        max-width: 280px;
        z-index: 2000;
    }

    .sc-model-provider-select {
        max-width: 95px;
        padding: 0.3rem 1.2rem 0.3rem 0.4rem;
        font-size: 0.6rem;
    }

    .sc-welcome-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        border-radius: 18px;
    }
}

/* ========================================================================== */
/*                            MODAIS CUSTOMIZADOS                             */
/* ========================================================================== */

.sc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* O diálogo compartilhado de confirmação pode ser aberto sobre outro modal. */
#sc-modal {
    z-index: 2600;
}

.sc-modal-container {
    background: rgba(18, 18, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-modal-overlay.active .sc-modal-container {
    transform: scale(1);
}

.sc-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sc-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-modal-close {
    background: none;
    border: none;
    color: #71717A;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-modal-close:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-modal-body {
    padding: 1.5rem;
    color: #D4D4D8;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sc-modal-body p {
    margin-bottom: 1rem;
}

#sc-modal-input-container {
    margin-top: 0.8rem;
}

.sc-modal-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: #FAFAFA;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.sc-modal-input:focus {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.sc-modal-actions {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.sc-btn {
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sc-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: #A1A1AA;
}

.sc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FAFAFA;
}

.sc-btn-primary {
    background: #5865F2;
    color: white;
}

.sc-btn-primary:hover {
    background: #7983F5;
    transform: translateY(-1px);
}

/* ========================================================================== */
/*                FASE 2 — PERSONAS, TEMPERATURA & NAVEGAÇÃO                  */
/* ========================================================================== */

/* Barra de Pesquisa de Conversas na Sidebar */
.sc-sidebar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.2s;
}

.sc-sidebar-search:focus-within {
    border-color: rgba(88, 101, 242, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.sc-sidebar-search i {
    color: #52525B;
    font-size: 0.8rem;
}

.sc-sidebar-search input {
    flex: 1;
    background: none;
    border: none;
    color: #FAFAFA;
    font-size: 0.8rem;
    outline: none;
    padding: 0;
}

.sc-sidebar-search input::placeholder {
    color: #52525B;
}

/* Seletor de Personas na Topbar */
.sc-persona-selector {
    position: relative;
    margin-left: 0.6rem;
}

.sc-persona-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: #FAFAFA;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-persona-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.sc-persona-btn i.fa-chevron-down {
    font-size: 0.7rem;
    color: #71717A;
    transition: transform 0.2s;
}

.sc-persona-btn.open i.fa-chevron-down {
    transform: rotate(180deg);
}

.sc-persona-dropdown {
    display: none;
    position: fixed;
    width: 290px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(18, 18, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    z-index: 100005;
    flex-direction: column;
    padding: 0.4rem;
    animation: dropdownIn 0.2s ease;
    scrollbar-width: none;
    /* Firefox */
}

.sc-persona-dropdown::-webkit-scrollbar {
    display: none;
    /* Safari e Chrome */
}

.sc-persona-dropdown.open {
    display: flex;
}

.sc-persona-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #A1A1AA;
    font-size: 0.82rem;
}

.sc-persona-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FAFAFA;
}

.sc-persona-option.active {
    background: rgba(88, 101, 242, 0.12);
    color: #7983F5;
}

.sc-persona-option .sc-po-icon {
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.sc-persona-option .sc-po-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sc-persona-option .sc-po-name {
    font-weight: 600;
}

.sc-persona-option .sc-po-desc {
    font-size: 0.7rem;
    color: #52525B;
    margin-top: 0.1rem;
}

/* Seletor de Temperatura acima do Input */
.sc-temp-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    padding-left: 0.4rem;
}

.sc-temp-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #52525B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sc-temp-pill {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    color: #71717A;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-temp-pill:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #A1A1AA;
}

.sc-temp-pill.active {
    background: rgba(88, 101, 242, 0.12);
    border-color: rgba(88, 101, 242, 0.3);
    color: #7983F5;
}

/* Painel de Ações Rápidas na Mensagem da IA */
.sc-msg-actions {
    display: flex;
    gap: 0.3rem;
    margin-left: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sc-message:hover .sc-msg-actions {
    opacity: 1;
}

@media (max-width: 768px) {
    .sc-msg-actions {
        opacity: 0.65;
    }
}

.sc-msg-action-btn {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sc-msg-action-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.06);
}

.sc-msg-action-btn.speaking {
    color: #7983F5;
    background: rgba(88, 101, 242, 0.1);
    animation: ttsPulse 1.2s infinite alternate;
}

@keyframes ttsPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
        /* box-shadow neon removido */
    }
}

/* Ondas de Áudio Dinâmicas */
.sc-audio-waves {
    display: none;
    align-items: center;
    gap: 2px;
    height: 12px;
    margin-left: 0.5rem;
}

.sc-audio-waves.active {
    display: flex;
}

.sc-wave-bar {
    width: 2px;
    height: 100%;
    background: #7983F5;
    border-radius: 1px;
    animation: audioWavePlay 1.2s ease-in-out infinite alternate;
    transform-origin: bottom;
}

.sc-wave-bar:nth-child(1) {
    animation-delay: 0.1s;
    animation-duration: 0.7s;
}

.sc-wave-bar:nth-child(2) {
    animation-delay: 0.3s;
    animation-duration: 1.1s;
}

.sc-wave-bar:nth-child(3) {
    animation-delay: 0.5s;
    animation-duration: 0.8s;
}

.sc-wave-bar:nth-child(4) {
    animation-delay: 0.2s;
    animation-duration: 0.9s;
}

@keyframes audioWavePlay {
    0% {
        transform: scaleY(0.25);
    }

    100% {
        transform: scaleY(1);
    }
}

/* Container de Exportação em PNG com Design Premium */
.sc-export-container {
    padding: 2.5rem;
    background: linear-gradient(135deg, #09090b 0%, #120e25 60%, #09090b 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    width: 650px;
    position: fixed;
    top: -9999px;
    left: -9999px;
    z-index: -9999;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    font-family: inherit;
}

.sc-export-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.sc-export-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: #FAFAFA;
}

.sc-export-logo i {
    color: #5865F2;
    /* filter neon removido */
}

.sc-export-model-badge {
    font-size: 0.72rem;
    color: #A1A1AA;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-export-body {
    color: #D4D4D8;
    font-size: 0.95rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.sc-export-body pre {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 1rem 0;
    padding: 1rem;
}

.sc-export-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.sc-export-watermark {
    text-align: right;
    font-size: 0.72rem;
    font-weight: 700;
    color: #71717A;
    margin-top: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.sc-export-watermark .sc-wm-crown {
    color: #818CF8;
    font-size: 0.85rem;
}

/* --- Profile Modal Redesign --- */
.sc-profile-container {
    max-width: 400px !important;
}

.sc-profile-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sc-profile-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-profile-avatar-large {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #5865F2;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.sc-profile-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sc-profile-info-block h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #FAFAFA;
    font-weight: 700;
}

.sc-profile-badge {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(88, 101, 242, 0.15);
    color: #7983F5;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

.sc-profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sc-profile-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}

.sc-profile-stat-box i {
    font-size: 1.2rem;
    color: #7983F5;
}

.sc-profile-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FAFAFA;
}

.sc-profile-stat-lbl {
    font-size: 0.75rem;
    color: #71717A;
}

.sc-profile-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sc-profile-action-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #D4D4D8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.sc-profile-action-item:hover {
    background: rgba(88, 101, 242, 0.08);
    border-color: rgba(88, 101, 242, 0.2);
    color: #FAFAFA;
}

.sc-profile-action-item i.arrow {
    margin-left: auto;
    font-size: 0.75rem;
    color: #71717A;
    transition: transform 0.2s;
}

.sc-profile-action-item:hover i.arrow {
    transform: translateX(2px);
    color: #FAFAFA;
}

.sc-btn-logout {
    transition: all 0.2s;
}

.sc-btn-logout:hover {
    background: rgba(239, 68, 68, 0.18) !important;
}

/* --- Shimmer Skeleton Loader --- */
.sc-user-pill.loading #sc-user-name {
    width: 80px;
    height: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
    color: transparent !important;
}

.sc-user-pill.loading .sc-user-avatar {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.sc-credits-display.loading #sc-credits-count {
    width: 30px;
    height: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
    color: transparent !important;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- Floating Note System --- */
.sc-notes-btn:hover {
    color: #FAFAFA !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.sc-floating-note {
    position: fixed;
    z-index: 900;
    background: rgba(18, 18, 22, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 200px;
    min-height: 150px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sc-floating-note:focus-within {
    border-color: rgba(88, 101, 242, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(88, 101, 242, 0.2);
}

.sc-note-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: grab;
    user-select: none;
}

.sc-note-header:active {
    cursor: grabbing;
}

.sc-note-header i.fa-note-sticky {
    color: #F59E0B;
    font-size: 0.85rem;
}

.sc-note-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #D4D4D8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-note-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sc-note-action-btn {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-note-action-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-note-action-btn.pin.active {
    color: #F59E0B;
}

.sc-note-action-btn.close:hover {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.sc-note-body {
    flex: 1;
    display: flex;
    position: relative;
    height: calc(100% - 30px);
}

.sc-note-textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    padding: 0.75rem;
    color: #E4E4E7;
    font-size: 0.85rem;
    line-height: 1.5;
    font-family: inherit;
}

/* Permitir redimensionamento na nota flutuante */
.sc-floating-note-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 70%, rgba(255, 255, 255, 0.15) 70%);
}

.sc-floating-note.minimized {
    height: 33px !important;
    min-height: 33px !important;
    width: 180px !important;
}

.sc-floating-note.minimized .sc-note-body {
    display: none;
}

.sc-floating-note.minimized .sc-floating-note-resize-handle {
    display: none;
}

/* --- Mobile Selectors inside Sidebar --- */
.sc-sidebar-mobile-selectors {
    display: none;
    /* Escondido no Desktop */
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-sidebar-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sc-sidebar-select-wrapper label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717A;
}

.sc-mobile-selector-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #FAFAFA;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.sc-mobile-selector-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.sc-mobile-selector-trigger i.fa-chevron-down {
    font-size: 0.75rem;
    color: #71717A;
    transition: transform 0.2s;
}

.sc-mobile-selector-trigger.open i.fa-chevron-down {
    transform: rotate(180deg);
}

.sc-mobile-model-icon {
    margin-right: 0.4rem;
    color: #5865F2;
}

.sc-mobile-persona-icon {
    margin-right: 0.4rem;
}

.sc-mobile-model-name,
.sc-mobile-persona-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ocultar seletores da topbar no mobile e mostrar no sidebar */
@media (max-width: 768px) {
    .sc-model-selector {
        display: inline-block !important;
    }

    .sc-persona-selector {
        display: none !important;
    }

    .sc-sidebar-mobile-selectors {
        display: flex !important;
    }

}

/* ========================================================================== */
/*                     NOVOS RECURSOS PREMIUM (FASE 7)                        */
/* ========================================================================== */

/* Bloco de Raciocínio Premium (Thinking Process) */
.sc-thinking-container {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.07) 0%, rgba(139, 92, 246, 0.03) 100%), rgba(18, 20, 32, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-left: 3px solid #6366F1;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0.6rem 0 1rem 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.35);
}

.sc-thinking-container.streaming {
    border-color: rgba(99, 102, 241, 0.45);
    border-left-color: #818CF8;
    box-shadow: 0 0 20px -3px rgba(99, 102, 241, 0.25), 0 4px 16px -2px rgba(0, 0, 0, 0.4);
}

.sc-thinking-header {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0 0.5rem 0 !important;
    margin: 0 !important;
    cursor: pointer;
    color: #E4E4E7;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.sc-thinking-header:hover {
    color: #FFFFFF;
}

.sc-thinking-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.sc-thinking-title i {
    color: #818CF8;
    font-size: 0.95rem;
    filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6));
    transition: transform 0.3s ease;
}

.sc-thinking-container.streaming .sc-thinking-title i {
    animation: pulseBrainGlow 1.8s infinite ease-in-out;
}

.sc-thinking-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: #A5B4FC;
    border: 1px solid rgba(99, 102, 241, 0.3);
    letter-spacing: 0.02em;
}

.sc-thinking-badge.done {
    background: rgba(34, 197, 94, 0.12);
    color: #86EFAC;
    border-color: rgba(34, 197, 94, 0.25);
}

.sc-thinking-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #71717A;
    font-size: 0.72rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sc-thinking-header:hover .sc-thinking-toggle {
    color: #A1A1AA;
}

.sc-thinking-chevron {
    font-size: 0.7rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.sc-thinking-content {
    color: #CBD5E1;
    font-size: 0.84rem;
    line-height: 1.65;
    padding-top: 0.6rem;
    font-style: normal;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.sc-thinking-content::-webkit-scrollbar {
    width: 5px;
}
.sc-thinking-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

.sc-thinking-content p {
    margin: 0.35rem 0;
}
.sc-thinking-content p:first-child {
    margin-top: 0;
}
.sc-thinking-content p:last-child {
    margin-bottom: 0;
}

.sc-thinking-content code {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.78rem;
    color: #E2E8F0;
}

.sc-thinking-content pre {
    background: rgba(10, 12, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}

/* Estado de Carregamento Shimmer */
.sc-thinking-shimmer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.35rem 0;
}

.sc-thinking-shimmer-bar {
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.28) 50%, rgba(99, 102, 241, 0.08) 100%);
    background-size: 200% 100%;
    animation: thinkingShimmer 2s infinite linear;
    width: 90%;
}

.sc-thinking-shimmer-bar.short {
    width: 65%;
}

.sc-thinking-loading-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: #818CF8;
    margin-top: 0.2rem;
    opacity: 0.9;
}

/* Colapsado */
.sc-thinking-container.collapsed {
    padding-bottom: 0.55rem;
    background: rgba(18, 20, 32, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(99, 102, 241, 0.4);
}

.sc-thinking-container.collapsed .sc-thinking-content {
    display: none !important;
}

.sc-thinking-container.collapsed .sc-thinking-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.sc-thinking-container.collapsed .sc-thinking-chevron {
    transform: rotate(-90deg);
}

@keyframes pulseBrainGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(129, 140, 248, 0.5));
    }
    50% {
        transform: scale(1.18);
        filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.9));
    }
}

@keyframes thinkingShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Conversas Fixadas (Pins) */
.sc-conv-item:has(.sc-conv-action-btn.pin.active) .sc-conv-actions {
    display: flex !important;
}

.sc-conv-item:has(.sc-conv-action-btn.pin.active) .sc-conv-action-btn.edit,
.sc-conv-item:has(.sc-conv-action-btn.pin.active) .sc-conv-action-btn.delete {
    display: none;
}

.sc-conv-item:has(.sc-conv-action-btn.pin.active):hover .sc-conv-action-btn.edit,
.sc-conv-item:has(.sc-conv-action-btn.pin.active):hover .sc-conv-action-btn.delete {
    display: block;
}

/* ========================================================================== */
/*                           ARTIFACT PANEL SYSTEM                            */
/* ========================================================================== */
.sc-artifact-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sc-multiscreen-panel-width);
    min-width: 0;
    height: 100vh;
    background: rgba(13, 13, 17, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sc-artifact-panel.active {
    width: var(--sc-multiscreen-panel-width);
    min-width: 0;
    transform: translateX(0);
}

.sc-artifact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(18, 18, 24, 0.95);
    flex-shrink: 0;
}

.sc-artifact-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-artifact-title-wrapper i {
    color: #5865F2;
}

.sc-artifact-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-artifact-tab {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #A1A1AA;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sc-artifact-tab:hover {
    color: #FAFAFA;
}

.sc-artifact-tab.active {
    background: rgba(88, 101, 242, 0.15);
    color: #7983F5;
}

.sc-artifact-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sc-artifact-action-btn,
.sc-artifact-download,
.sc-artifact-close {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-artifact-action-btn:hover,
.sc-artifact-download:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-artifact-action-btn:focus-visible,
.sc-artifact-download:focus-visible,
.sc-artifact-close:focus-visible,
.sc-artifact-tab:focus-visible {
    outline: 2px solid #7983F5;
    outline-offset: 2px;
}

.sc-artifact-close:hover {
    color: #F43F5E;
    background: rgba(244, 63, 94, 0.1);
}

.sc-artifact-body {
    flex: 1;
    position: relative;
    background: #09090B;
    overflow: hidden;
}

.sc-artifact-content {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.sc-artifact-content.active {
    display: block;
}

.sc-artifact-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #FFFFFF;
}

#sc-artifact-code-tab {
    overflow: auto;
    padding: 1rem;
    background: #0D0D11;
}

#sc-artifact-code-tab pre {
    margin: 0;
}

/* Badge Preview no chat */
.sc-artifact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(139, 92, 246, 0.22));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0.75rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.15);
}

.sc-artifact-badge i {
    color: #a78bfa;
    font-size: 0.85rem;
}

.sc-artifact-badge:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(139, 92, 246, 0.35));
    border-color: rgba(167, 139, 250, 0.7);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.sc-code-preview-btn {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-weight: 600;
}

.sc-code-preview-btn:hover {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(167, 139, 250, 0.5);
}

/* Badge de Matemática no chat */
.sc-math-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 6px;
    color: #F59E0B;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sc-math-badge:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    color: #FAFAFA;
    transform: translateY(-1px);
}

/* Responsividade Mobile */
@media (max-width: 1024px) {

    .sc-artifact-panel.active,
    .sc-math-panel.active {
        width: 50vw;
        min-width: unset;
    }
}

@media (max-width: 768px) {

    .sc-artifact-panel,
    .sc-math-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100vw;
        min-width: 100vw;
        height: 75vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
    }

    .sc-artifact-panel.active,
    .sc-math-panel.active {
        width: 100vw !important;
        min-width: 100vw !important;
        transform: translateY(0);
        z-index: 9999;
    }
}

.sc-sidebar-memories-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: #A78BFA;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-bottom: 0.6rem;
    justify-content: center;
}

.sc-sidebar-memories-btn:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.4);
    color: #FAFAFA;
}

/* ========================================================================== */
/*                           MEMORIES MODAL SYSTEM                            */
/* ========================================================================== */
.sc-memories-bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    min-height: 40px;
}

.sc-memories-bulk-actions[hidden] {
    display: none;
}

.sc-memories-select-all-label,
.sc-memory-select-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #A1A1AA;
    font-size: 0.78rem;
    cursor: pointer;
}

.sc-memory-select,
#sc-memories-select-all {
    width: 17px;
    height: 17px;
    accent-color: #66afe7;
    cursor: pointer;
}

#sc-memories-selection-count {
    flex: 1;
    color: #71717A;
    font-size: 0.75rem;
}

#sc-memories-delete-selected {
    min-height: 38px;
    border-color: rgba(244, 63, 94, 0.35);
    color: #FDA4AF;
}

#sc-memories-delete-selected:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sc-memory-select-label {
    flex: 0 0 auto;
}

.sc-memory-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    gap: 0.75rem;
    transition: all 0.2s;
}

@media (max-width: 560px) {
    .sc-memories-bulk-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    #sc-memories-delete-selected {
        width: 100%;
    }
}

.sc-memory-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.sc-memory-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sc-memory-text {
    font-size: 0.85rem;
    color: #E4E4E7;
    line-height: 1.4;
}

.sc-memory-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sc-memory-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.15rem 0.40rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.sc-memory-badge.auto {
    background: rgba(88, 101, 242, 0.12);
    color: #7983F5;
}

.sc-memory-badge.manual {
    background: rgba(139, 92, 246, 0.12);
    color: #A78BFA;
}

.sc-memory-date {
    font-size: 0.65rem;
    color: #52525B;
}

.sc-memory-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sc-memory-btn {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-memory-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.06);
}

.sc-memory-btn.delete:hover {
    color: #F43F5E;
    background: rgba(244, 63, 94, 0.1);
}

/* ========================================================================== */
/*                      MODO VOZ GEMINI LIVE (FASE 3)                         */
/* ========================================================================== */

/* Botão de voz na barra de input */
.sc-voice-btn {
    background: none;
    border: none;
    color: #71717A;
    cursor: pointer;
    font-size: 1.05rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.sc-voice-btn:hover {
    color: #10B981;
    /* Verde esmeralda para sinalizar voz/mic */
    background: rgba(16, 185, 129, 0.08);
}

.sc-voice-btn.active {
    color: #FAFAFA;
    background: #10B981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    animation: voiceMicPulse 1.5s infinite alternate;
}

@keyframes voiceMicPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

/* Overlay de chamada */
.sc-voice-overlay {
    position: fixed;
    inset: 0;
    background: #060609;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-voice-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Container de voz em tela cheia no PC (Imersivo de Verdade) */
.sc-voice-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    padding: 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    background: #060609;
    border: none;
    border-radius: 0;
}

.sc-voice-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.sc-voice-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #FAFAFA;
}

.sc-voice-brand i {
    color: #8B5CF6;
}

.sc-voice-hud-clock {
    font-family: monospace;
    font-size: 0.85rem;
    color: #71717A;
    letter-spacing: 0.05em;
}

.sc-voice-hud-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Badge de Timer */
.sc-voice-timer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #E4E4E7;
}

.sc-voice-timer-dot {
    width: 6px;
    height: 6px;
    background: #EF4444;
    border-radius: 50%;
    animation: voiceStatusBlink 1s infinite alternate;
}

.sc-voice-minimize-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #71717A;
    cursor: pointer;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sc-voice-minimize-btn:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.08);
}

/* Grid de três colunas para o HUD Trilateral */
.sc-voice-content {
    flex: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    gap: 2rem;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
}

/* Estilo Geral dos Cards de Glassmorphism (Fosco Premium, sem sombras ou glows) */
.sc-voice-card {
    background: rgba(10, 10, 15, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: none !important;
}

.sc-voice-card-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #71717A;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Painel Esquerdo: Cards de Informação e Ações */
.sc-voice-left-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 320px;
    overflow-y: auto;
    min-width: 0;
    scrollbar-width: none;
    /* Ocultar barra de rolagem no Firefox */
}

.sc-voice-left-panel::-webkit-scrollbar {
    display: none;
    /* Ocultar barra de rolagem no Chrome/Safari */
}

.sc-voice-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sc-voice-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: cover;
}

.sc-voice-user-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sc-voice-username {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-voice-vip-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: #A78BFA;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sc-voice-user-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sc-voice-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.sc-voice-stat-label {
    color: #71717A;
}

.sc-voice-stat-value {
    font-weight: 700;
    color: #FAFAFA;
}

.sc-voice-system-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sc-voice-system-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sc-voice-system-stat .sc-voice-stat-value {
    font-family: monospace;
    font-size: 0.8rem;
}

/* Painel de Clima Dinâmico */
.sc-voice-weather-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-voice-weather-info {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sc-voice-weather-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-voice-weather-city {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-voice-weather-temp {
    font-size: 1.35rem;
    font-weight: 800;
    color: #A78BFA;
    font-family: monospace;
}

.sc-voice-weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.sc-voice-weather-detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sc-voice-weather-detail .sc-voice-stat-value {
    font-size: 0.8rem;
    color: #FAFAFA;
}

/* Painel Central: Reator e status de fala/ouvir */
.sc-voice-center-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6rem;
    position: relative;
    min-width: 0;
}

.sc-voice-status-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
}

.sc-voice-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #71717A;
}

.sc-voice-status-box.connecting .sc-voice-pulse {
    background: #D97706;
    animation: voiceStatusBlink 1s infinite alternate;
}

.sc-voice-status-box.listening .sc-voice-pulse {
    background: #10B981;
    animation: voiceStatusBlink 0.6s infinite alternate;
}

.sc-voice-status-box.speaking .sc-voice-pulse {
    background: #0EA5E9;
    animation: voiceStatusBlink 0.4s infinite alternate;
}

.sc-voice-status-box.consulting .sc-voice-pulse {
    background: #A78BFA;
    animation: voiceStatusBlink 0.5s infinite alternate;
}

.sc-voice-status {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #FAFAFA;
}

/* Indicador de ferramenta ativa no painel central */
.sc-voice-tool-indicator {
    position: absolute;
    top: 10%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #C084FC;
}

/* Reator de arco (Arc Reactor central) */
.sc-voice-reactor-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-voice-reactor {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.005);
    border: 1.5px dashed rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-voice-reactor-core {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(113, 113, 122, 0.25) 75%, rgba(113, 113, 122, 0.45) 100%);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(217, 119, 6, 0.35) 75%, rgba(217, 119, 6, 0.55) 100%);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(14, 165, 233, 0.45) 75%, rgba(14, 165, 233, 0.65) 100%);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(139, 92, 246, 0.45) 75%, rgba(139, 92, 246, 0.65) 100%);
}

.sc-voice-reactor-ring {
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: spinRing 6s linear infinite;
    pointer-events: none;
}

.sc-voice-reactor-ring.animate-2 {
    inset: -20px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-left-color: rgba(255, 255, 255, 0.1);
    border-right-color: rgba(255, 255, 255, 0.1);
    animation: spinRing 8s linear infinite reverse;
}

.sc-voice-reactor-ring.animate-3 {
    inset: -30px;
    border: 1px dashed rgba(255, 255, 255, 0.01);
    border-top-color: rgba(255, 255, 255, 0.06);
    animation: spinRing 14s linear infinite;
}

.sc-voice-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sc-voice-core-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #52525B;
    text-transform: uppercase;
}

/* Painel Direito: Transcrição & Agenda */
.sc-voice-right-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 380px;
    overflow-y: auto;
    min-width: 0;
    scrollbar-width: none;
    /* Ocultar barra de rolagem no Firefox */
}

.sc-voice-right-panel::-webkit-scrollbar {
    display: none;
    /* Ocultar barra de rolagem no Chrome/Safari */
}

.sc-voice-transcript-card {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.sc-voice-transcript {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    word-wrap: break-word;
    word-break: break-word;
    overflow-x: hidden;
}

.sc-voice-transcript::-webkit-scrollbar {
    width: 3px;
}

.sc-voice-transcript::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.sc-voice-transcript p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #D4D4D8;
}

.sc-voice-transcript-placeholder {
    color: #52525B !important;
    font-style: italic;
}

/* Balão de transcrição de fala do Jarvis */
.sc-voice-speech-bubble {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sc-voice-speaker-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #8B5CF6;
    letter-spacing: 0.05em;
}

.sc-voice-speech-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #E4E4E7;
}

/* Agenda / Compromissos */
.sc-voice-agenda-card-container {
    height: 260px;
    flex-shrink: 0;
}

.sc-voice-agenda-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-right: 4px;
    scrollbar-width: thin;
}

.sc-voice-agenda-list::-webkit-scrollbar {
    width: 3px;
}

.sc-voice-agenda-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.sc-voice-agenda-placeholder {
    color: #52525B !important;
    font-style: italic;
    font-size: 0.8rem;
}

/* Controles e select de voz */
.sc-voice-select-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sc-voice-select-wrapper label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #71717A;
    letter-spacing: 0.05em;
}

.sc-voice-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: #FAFAFA;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* Botões flutuantes inferiores */
.sc-voice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
}

.sc-voice-action-btn {
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-voice-action-btn.sc-voice-mute {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #D4D4D8;
}

.sc-voice-action-btn.sc-voice-mute:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FAFAFA;
}

.sc-voice-action-btn.sc-voice-mute.muted {
    background: #EF4444;
    border-color: #EF4444;
    color: white;
    box-shadow: none !important;
}

.sc-voice-action-btn.sc-voice-end {
    background: #EF4444;
    color: white;
}

.sc-voice-action-btn.sc-voice-end:hover {
    background: #F87171;
    transform: scale(1.05);
}


/* ========================================================================== */
/*                      CENTRAL DE EXPORTAÇÃO PREMIUM (FASE 4)                 */
/* ========================================================================== */

.sc-export-wrapper {
    position: relative;
    display: inline-block;
}

.sc-export-dropdown {
    display: none;
    position: absolute;
    bottom: 110%;
    right: 0;
    background: rgba(18, 18, 24, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.35rem;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    flex-direction: column;
    gap: 0.2rem;
    backdrop-filter: blur(15px);
    animation: dropdownIn 0.2s ease;
}

.sc-export-dropdown.open {
    display: flex;
}

.sc-export-dropdown.open-down {
    bottom: auto;
    top: 110%;
}

.sc-export-header-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #71717A;
    padding: 0.25rem 0.5rem;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.sc-export-theme-selector {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    gap: 0.4rem;
}

.sc-export-theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.sc-export-theme-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sc-export-theme-btn.active {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.sc-export-theme-btn[data-theme="corporate"].active {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.sc-export-theme-btn[data-theme="military"].active {
    border-color: #D97706;
    background: rgba(217, 119, 6, 0.1);
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

.sc-export-theme-btn[data-theme="minimalist"].active {
    border-color: #FAFAFA;
    background: rgba(250, 250, 250, 0.1);
    box-shadow: 0 0 8px rgba(250, 250, 250, 0.4);
}

.theme-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.theme-dot.classic {
    background: #8B5CF6;
}

.theme-dot.corporate {
    background: #2563EB;
}

.theme-dot.military {
    background: #D97706;
}

.theme-dot.minimalist {
    background: #FAFAFA;
    border: 1px solid #71717A;
}

.sc-export-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.35rem 0.2rem;
}

.sc-export-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #A1A1AA;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.15s;
}

.sc-export-option:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-export-option i.fa-file-pdf {
    color: #EF4444;
}

.sc-export-option i.fa-file-word {
    color: #3B82F6;
}

.sc-export-option i.fa-file-powerpoint {
    color: #F59E0B;
}

/* --- MODO VOZ IMERSIVO & REATOR ANIMADO --- */
.sc-immersive-voice-btn:hover {
    color: #8B5CF6 !important;
    background: rgba(139, 92, 246, 0.08) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}

/* Quando o overlay está em modo imersivo (fullscreen) */
.sc-voice-overlay.immersive {
    background: #060609;
}

.sc-voice-overlay.immersive .sc-voice-container {
    max-width: 100%;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    background: #060609;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
}

.sc-voice-overlay.immersive .sc-voice-header {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-voice-overlay.immersive .sc-voice-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 1.5rem auto;
    display: grid;
    grid-template-columns: 280px 1fr 380px;
    gap: 3rem;
    align-items: stretch;
}

.sc-voice-overlay.immersive .sc-voice-actions {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    justify-content: center;
    gap: 2rem;
}

/* Responsividade de layout para telas menores */
@media (max-width: 900px) {
    .sc-voice-overlay.immersive .sc-voice-container {
        padding: 1.5rem;
    }

    .sc-voice-overlay.immersive .sc-voice-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
    }

    .sc-voice-left-panel {
        width: 100%;
        margin-bottom: 1rem;
    }

    .sc-voice-right-panel {
        width: 100%;
        height: auto;
        min-height: 250px;
        flex: none;
    }

    .sc-voice-transcript-container {
        height: 250px;
    }
}

/* O Reator de Voz (Arc Reactor Style - Minimalista) */
.sc-voice-reactor {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.01);
    border: 1.5px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mudança de cor suave com base nos estados */
.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor {
    border-color: rgba(217, 119, 6, 0.15);
}

.sc-voice-status-box.listening~.sc-voice-reactor-wrapper .sc-voice-reactor {
    border-color: rgba(255, 255, 255, 0.12);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor {
    border-color: rgba(14, 165, 233, 0.2);
    transform: scale(1.02);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor {
    border-color: rgba(139, 92, 246, 0.2);
    transform: scale(1.02);
}

.sc-voice-reactor-core {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(113, 113, 122, 0.4) 75%, rgba(113, 113, 122, 0.6) 100%);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.12), inset 0 0 12px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(217, 119, 6, 0.5) 75%, rgba(217, 119, 6, 0.7) 100%);
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.3);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(14, 165, 233, 0.6) 75%, rgba(14, 165, 233, 0.8) 100%);
    box-shadow: 0 0 35px rgba(14, 165, 233, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.7);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor-core {
    background: radial-gradient(circle, #ffffff 0%, rgba(139, 92, 246, 0.5) 75%, rgba(139, 92, 246, 0.7) 100%);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.7);
}

.sc-voice-reactor-ring {
    position: absolute;
    inset: -12px;
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.2);
    border-bottom-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: spinRing 5s linear infinite;
    pointer-events: none;
}

.sc-voice-reactor-ring.animate-2 {
    inset: -24px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-left-color: rgba(255, 255, 255, 0.12);
    border-right-color: rgba(255, 255, 255, 0.12);
    animation: spinRing 7s linear infinite reverse;
}

.sc-voice-reactor-ring.animate-3 {
    inset: -36px;
    border: 1px dashed rgba(255, 255, 255, 0.02);
    border-top-color: rgba(255, 255, 255, 0.08);
    animation: spinRing 12s linear infinite;
}

/* Modificações dos anéis com base no estado (Cores suaves/opacas) */
.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring {
    border-top-color: rgba(217, 119, 6, 0.3);
    border-bottom-color: rgba(217, 119, 6, 0.3);
}

.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-2 {
    border-left-color: rgba(217, 119, 6, 0.2);
    border-right-color: rgba(217, 119, 6, 0.2);
}

.sc-voice-status-box.connecting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-3 {
    border-top-color: rgba(217, 119, 6, 0.12);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor-ring {
    border-top-color: rgba(14, 165, 233, 0.4);
    border-bottom-color: rgba(14, 165, 233, 0.4);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-2 {
    border-left-color: rgba(14, 165, 233, 0.25);
    border-right-color: rgba(14, 165, 233, 0.25);
}

.sc-voice-status-box.speaking~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-3 {
    border-top-color: rgba(14, 165, 233, 0.15);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring {
    border-top-color: rgba(139, 92, 246, 0.4);
    border-bottom-color: rgba(139, 92, 246, 0.4);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-2 {
    border-left-color: rgba(139, 92, 246, 0.25);
    border-right-color: rgba(139, 92, 246, 0.25);
}

.sc-voice-status-box.consulting~.sc-voice-reactor-wrapper .sc-voice-reactor-ring.animate-3 {
    border-top-color: rgba(139, 92, 246, 0.15);
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ditado por Voz */
.sc-voice-btn.recording {
    background: #EF4444 !important;
    color: #FAFAFA !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
    animation: pulseRecording 1s infinite alternate;
}

@keyframes pulseRecording {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Responsividade para celulares */
@media (max-width: 480px) {
    .sc-voice-reactor-wrapper {
        transform: scale(0.72) !important;
        margin: -5.5rem 0 !important;
        height: 300px !important;
        width: 300px !important;
    }

    .sc-voice-container {
        padding: 1.5rem !important;
        width: 92% !important;
    }
}

/* Estado Minimizado da Chamada de Voz */
.sc-voice-overlay.minimized {
    inset: auto !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 220px !important;
    height: 60px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: #09090b !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 0.75rem !important;
    overflow: hidden !important;
    z-index: 999999 !important;
}

.sc-voice-overlay.minimized .sc-voice-container {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: transparent !important;
}

.sc-voice-overlay.minimized .sc-voice-header {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    max-width: none !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.sc-voice-overlay.minimized .sc-voice-brand {
    display: none !important;
    /* Remove o nome da Supremacy/Jarvis */
}

.sc-voice-overlay.minimized .sc-voice-hud-clock {
    display: none !important;
}

.sc-voice-overlay.minimized .sc-voice-title {
    font-size: 0.85rem !important;
}

.sc-voice-overlay.minimized .sc-voice-title span,
.sc-voice-overlay.minimized .sc-voice-timer-badge {
    font-size: 0.7rem !important;
    padding: 0.15rem 0.45rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
}

.sc-voice-overlay.minimized .sc-voice-minimize-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.72rem !important;
    margin-right: 0 !important;
}

.sc-voice-overlay.minimized .sc-voice-minimize-btn i {
    transform: rotate(180deg);
}

.sc-voice-overlay.minimized .sc-voice-content {
    display: none !important;
}

@media screen and (min-width: 992px) {
    .sc-voice-overlay.minimized .sc-voice-actions {
        max-width: none !important;
        width: auto !important;
        margin: 0 !important;
        gap: 0.45rem !important;
        margin-left: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        display: flex !important;
        align-items: center !important;
    }

    .sc-voice-overlay.minimized .sc-voice-actions .sc-voice-action-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
}

/* ========================================================================== */
/*                             MATH PANEL SYSTEM                              */
/* ========================================================================== */
.ai-chat-body {
    --sc-multiscreen-panel-width: clamp(420px, 42vw, 760px);
}

.ai-chat-body.sc-math-open .sc-main,
.ai-chat-body.sc-artifact-open .sc-main {
    margin-right: var(--sc-multiscreen-panel-width);
}

.sc-artifact-panel.active {
    width: var(--sc-multiscreen-panel-width);
}

.sc-math-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sc-multiscreen-panel-width);
    min-width: 0;
    height: 100vh;
    background: rgba(13, 13, 17, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
}

.sc-math-panel.active {
    width: var(--sc-multiscreen-panel-width);
    transform: translateX(0);
}

@media (min-width: 993px) and (max-width: 1440px) {
    .ai-chat-body.sc-math-open .sc-sidebar,
    .ai-chat-body.sc-artifact-open .sc-sidebar {
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        flex-basis: 0 !important;
        overflow: hidden !important;
        border-right: 0 !important;
        transform: translateX(-100%);
        pointer-events: none;
    }
}

.sc-math-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(18, 18, 24, 0.95);
    flex-shrink: 0;
}

.sc-math-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #FAFAFA;
}

.sc-math-title-wrapper i {
    color: #F59E0B;
    /* Cor âmbar */
}

.sc-math-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sc-math-action-btn,
.sc-math-close {
    background: none;
    border: none;
    color: #A1A1AA;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sc-math-action-btn:hover,
.sc-math-close:hover {
    color: #FAFAFA;
    background: rgba(255, 255, 255, 0.05);
}

.sc-math-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #0f0f13;
    display: flex;
    flex-direction: column;
}

/* Quadro Negro Escolar de Faculdade */
.sc-math-blackboard {
    flex: 1;
    background: radial-gradient(circle, #0e332c 0%, #051a16 100%);
    border: 14px solid #3e2723;
    /* Moldura de madeira escura */
    border-radius: 8px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 8px 25px rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

/* Efeito de Textura/Giz da Lousa */
.sc-math-blackboard::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0);
    background-size: 6px 6px;
    pointer-events: none;
    opacity: 0.5;
}

/* Escrita em Giz na Lousa */
.sc-math-chalkboard-content {
    font-family: 'Caveat', 'Architects Daughter', cursive, sans-serif;
    font-size: 1.6rem;
    line-height: 1.7;
    color: rgba(240, 240, 240, 0.95);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3), 0 0 4px rgba(255, 255, 255, 0.1);
    white-space: pre-wrap;
    letter-spacing: 0.5px;
}

/* Estilos de Giz Coloridos */
.sc-math-chalkboard-content .giz-title {
    color: #fef08a;
    /* Giz Amarelo */
    font-family: 'Architects Daughter', cursive;
    font-weight: 700;
    font-size: 1.8rem;
    border-bottom: 2px dashed rgba(254, 240, 138, 0.3);
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
    display: block;
    text-shadow: 0 0 2px rgba(254, 240, 138, 0.4);
}

.sc-math-chalkboard-content .giz-step {
    color: #93c5fd;
    /* Giz Azul */
    font-weight: 600;
    display: block;
    margin-top: 1.2rem;
    text-shadow: 0 0 2px rgba(147, 197, 253, 0.4);
}

.sc-math-chalkboard-content .giz-formula {
    color: #86efac;
    /* Giz Verde */
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1.22rem;
    padding: 0.5rem 0.8rem;
    background: rgba(134, 239, 172, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(134, 239, 172, 0.3);
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0.6rem 0;
    text-shadow: 0 0 2px rgba(134, 239, 172, 0.4);
    white-space: pre;
    overflow-x: auto;
}

.sc-math-chalkboard-content .giz-result {
    color: #fca5a5;
    /* Giz Vermelho/Rosa */
    font-family: 'Architects Daughter', cursive;
    font-weight: 700;
    font-size: 2rem;
    border: 2px solid rgba(252, 165, 165, 0.3);
    padding: 0.4rem 0.8rem;
    display: inline-block;
    margin-top: 1.5rem;
    text-shadow: 0 0 3px rgba(252, 165, 165, 0.5);
}

.sc-math-chalkboard-content .giz-plain {
    color: rgba(255, 255, 255, 0.85);
}

/* Responsividade do Painel de Matemática */
@media (max-width: 992px) {
    .ai-chat-body.sc-math-open .sc-main,
    .ai-chat-body.sc-artifact-open .sc-main {
        margin-right: 0;
    }

    .sc-math-panel,
    .sc-artifact-panel {
        position: fixed;
        width: 100vw;
        min-width: 100%;
        height: 60vh;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 9999;
        transform: translateY(100%);
    }

    .sc-math-panel.active,
    .sc-artifact-panel.active {
        width: 100vw !important;
        min-width: 100vw !important;
        transform: translateY(0);
    }
}

/* Ocultar bloco de código math_steps cru no chat */
.sc-math-raw-block {
    display: none !important;
}

/* Deep Research Styles */
.sc-deep-research-container {
    background: rgba(168, 85, 247, 0.04);
    border: 1px dashed rgba(168, 85, 247, 0.25);
    border-radius: 12px;
    padding: 0.8rem 1.1rem;
    margin: 0.8rem 0 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    animation: scFadeIn 0.3s ease;
}

.sc-deep-research-container.completed {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.8rem;
}

.sc-deep-research-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #E9D5FF;
}

.sc-deep-research-container.completed .sc-deep-research-header {
    color: #A7F3D0;
}

.sc-deep-research-header i {
    font-size: 1rem;
}

.sc-deep-research-header i.fa-circle-nodes {
    color: #C084FC;
}

.sc-deep-research-header i.fa-circle-check {
    color: #34D399;
}

.sc-deep-research-steps {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sc-dr-step {
    font-size: 0.78rem;
    color: #A1A1AA;
    padding-left: 1.4rem;
    position: relative;
}

.sc-dr-step.active {
    color: #E9D5FF;
    font-weight: 500;
}

.sc-dr-step.active::before {
    content: "•";
    color: #C084FC;
    position: absolute;
    left: 0.4rem;
    font-size: 1.2rem;
    line-height: 1;
    top: -0.1rem;
}

@keyframes scFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Modais do Chat (Overlay e Contêiner) */
.sc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 12, 0.75);
    backdrop-filter: blur(12px);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: scFadeIn 0.25s ease-out;
}

.sc-modal-overlay.active {
    display: flex;
}

.sc-modal-container {
    background: #111116;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: scModalShow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scModalShow {
    from {
        transform: scale(0.96) translateY(10px);
        opacity: 0;
    }

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

.sc-modal-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f4f4f7;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sc-modal-close {
    background: none;
    border: none;
    color: #71717A;
    font-size: 1.1rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.sc-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f4f4f7;
}

.sc-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Abas de Categoria */
.sc-prompts-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
    /* Firefox */
}

.sc-prompts-tabs::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.sc-prompt-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #a1a1aa;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.sc-prompt-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f4f4f7;
}

.sc-prompt-tab.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Campo de busca */
.sc-prompts-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sc-prompts-search i {
    position: absolute;
    left: 1rem;
    color: #71717A;
    font-size: 0.9rem;
}

.sc-prompts-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.65rem 1rem 0.65rem 2.25rem;
    color: #f4f4f7;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s;
}

.sc-prompts-search input:focus {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

/* Lista de prompts e customização de scrollbar */
.sc-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sc-prompts-list::-webkit-scrollbar,
.sc-prompt-card-preview::-webkit-scrollbar {
    width: 6px;
}

.sc-prompts-list::-webkit-scrollbar-track,
.sc-prompt-card-preview::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.sc-prompts-list::-webkit-scrollbar-thumb,
.sc-prompt-card-preview::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.sc-prompts-list::-webkit-scrollbar-thumb:hover,
.sc-prompt-card-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Cards da Biblioteca de Prompts (Scoped para evitar conflito com o prompt input principal) */
.sc-prompts-list .sc-prompt-card,
.sc-library-prompt-card {
    position: relative !important;
    width: 100% !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
    padding: 1.1rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    transition: all 0.2s ease-out !important;
}

.sc-prompts-list .sc-prompt-card:hover,
.sc-library-prompt-card:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px) !important;
}

.sc-prompts-list .sc-prompt-card:focus-within,
.sc-library-prompt-card:focus-within {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: none !important;
}

.sc-prompt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.sc-prompt-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #f4f4f7;
}

.sc-prompt-card-tag {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cores harmônicas e discretas para tags */
.sc-prompt-card-tag.coder {
    background: rgba(59, 130, 246, 0.08);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.15);
}

.sc-prompt-card-tag.copywriter {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.15);
}

.sc-prompt-card-tag.marketing {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.15);
}

.sc-prompt-card-tag.estudos {
    background: rgba(236, 72, 153, 0.08);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.15);
}

.sc-prompt-card-tag.produtividade {
    background: rgba(99, 102, 241, 0.08);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.15);
}

.sc-prompt-card-desc {
    font-size: 0.82rem;
    color: #a1a1aa;
    line-height: 1.35;
}

.sc-prompt-card-preview {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.65rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.78rem;
    color: #a1a1aa;
    max-height: 85px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.sc-prompt-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.sc-btn-use-prompt,
.sc-btn-copy-prompt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sc-btn-use-prompt {
    background: #6366f1;
    color: #ffffff;
}

.sc-btn-use-prompt:hover {
    background: #4f46e5;
}

.sc-btn-copy-prompt {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
}

.sc-btn-copy-prompt:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sc-prompts-empty {
    padding: 2rem;
    text-align: center;
    color: #71717A;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================================================== */
/*                      AJUSTES MOBILE PREMIUM (JARVIS VOICE)                 */
/* ========================================================================== */
@media screen and (max-width: 991px) {

    /* Container principal da chamada */
    .sc-voice-container {
        padding: 1rem 0 !important;
        /* Sem padding lateral para o scroll ir até o canto */
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* Cabeçalho do HUD */
    .sc-voice-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
        box-sizing: border-box;
    }

    .sc-voice-brand span {
        font-size: 0.85rem;
    }

    /* Ocultar relógio no mobile para economizar espaço e evitar quebras */
    .sc-voice-hud-clock {
        display: none !important;
    }

    /* Ajuste do timer e botões superiores */
    .sc-voice-timer-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Estrutura do conteúdo principal em coluna única rolável */
    .sc-voice-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        flex: 1;
        height: auto;
        overflow: visible;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 90px;
        /* Espaço para não cobrir o rodapé fixo */
        box-sizing: border-box;
    }

    /* Painel esquerdo rolável no mobile */
    .sc-voice-left-panel {
        display: flex !important;
        width: 100% !important;
        flex-direction: column;
        gap: 1rem;
    }

    /* Painel central (Reator Jarvis) */
    .sc-voice-center-panel {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1.5rem 0;
        width: 100% !important;
    }

    /* Removemos o redimensionamento do reator e do canvas para evitar bugs na animação em JS */

    /* Painel direito (Transcrição + Agenda) */
    .sc-voice-right-panel {
        width: 100% !important;
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }

    .sc-voice-transcript-card {
        min-height: 250px;
        background: rgba(10, 10, 15, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Exibir a agenda de compromissos no mobile */
    .sc-voice-agenda-card-container {
        display: block !important;
        width: 100% !important;
    }

    /* Botões de Ações de Chamada Fixos no Rodapé */
    .sc-voice-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        gap: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
        background: rgba(6, 6, 9, 0.95);
        backdrop-filter: blur(10px);
        margin: 0;
        justify-content: center;
    }

    .sc-voice-action-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    /* Garantir que o widget do player de música caiba na tela no mobile e ignore as coordenadas absolutas de arrastar salvas em desktops */
    .premium-music-widget {
        left: 10px !important;
        right: 10px !important;
        top: 75px !important;
        bottom: auto !important;
        width: auto !important;
        max-width: calc(100% - 20px) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(139, 92, 246, 0.2) !important;
        /* Destaque sutil com a cor tema */
    }

    /* Ajuste visual do card de Clima no Mobile - Card flutuante premium no topo do HUD */
    .sc-voice-weather-card {
        position: fixed !important;
        top: 75px !important;
        left: 16px !important;
        right: 16px !important;
        width: calc(100% - 32px) !important;
        z-index: 4000 !important;
        background: rgba(10, 10, 15, 0.95) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(139, 92, 246, 0.25) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
        box-sizing: border-box;
        animation: slideDownFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Ajustes quando há uma chamada ativa e minimizada no mobile */
    body.sc-call-active.sc-call-minimized .sc-input-area {
        padding-bottom: 95px !important;
        /* Abre espaço para a barra de ações da chamada (fixed no bottom) */
    }

    body.sc-call-active.sc-call-minimized .premium-music-widget {
        top: 75px !important;
        bottom: auto !important;
        /* Mantém no topo e evita qualquer sobreposição */
    }

    /* Impedir que o painel de chamada minimizado cubra a tela de texto no celular, mantendo apenas a barra de ações interativa */
    .sc-voice-overlay.minimized {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        pointer-events: none !important;
        padding: 0 !important;
        z-index: 999999 !important;
    }

    .sc-voice-overlay.minimized .sc-voice-container {
        pointer-events: none !important;
        background: transparent !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
    }

    .sc-voice-overlay.minimized .sc-voice-header,
    .sc-voice-overlay.minimized .sc-voice-content {
        display: none !important;
    }

    .sc-voice-overlay.minimized .sc-voice-actions {
        pointer-events: auto !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: rgba(6, 6, 9, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 1rem !important;
        gap: 1rem !important;
        margin: 0 !important;
        z-index: 999999 !important;
    }

    /* Forçar tamanho grande dos botões no mobile mesmo quando minimizado */
    .sc-voice-overlay.minimized .sc-voice-action-btn,
    body.sc-call-minimized .sc-voice-action-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 1.4rem !important;
    }

    /* Alinhamento do timer no mobile */
    .sc-voice-overlay.minimized .sc-voice-actions .sc-voice-minimized-timer,
    body.sc-call-minimized .sc-voice-actions .sc-voice-minimized-timer {
        height: 48px !important;
        padding: 0 1.25rem !important;
        border-radius: 24px !important;
        font-size: 0.9rem !important;
        margin-right: 0 !important;
    }
}

/* Card de Erro Premium para Alertas de IA */
.sc-error-card {
    margin: 0.5rem 0;
    padding: 1.25rem;
    background: rgba(239, 68, 68, 0.04);
    border: 1px dashed rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: fadeInUpError 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUpError {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.sc-error-icon {
    color: #EF4444;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.15);
    flex-shrink: 0;
}

.sc-error-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sc-error-title {
    color: #F87171;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sc-error-message {
    color: #E4E4E7;
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 500;
}

.sc-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.sc-error-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #D4D4D8;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    outline: none;
}

.sc-error-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    color: #FAFAFA;
    transform: translateY(-1px);
}

.sc-error-btn.change-model-btn {
    background: rgba(88, 101, 242, 0.12);
    border-color: rgba(88, 101, 242, 0.25);
    color: #7983F5;
}

.sc-error-btn.change-model-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.45);
    color: #FAFAFA;
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
}

/* Miniatura da Imagem Anexada no Chat (Mensagem do Usuário) */
.sc-message-media-area {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sc-attached-chat-image {
    max-width: 280px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
    object-fit: cover;
}

.sc-attached-chat-image:hover {
    transform: scale(1.02);
    border-color: rgba(88, 101, 242, 0.5);
}

/* Arquivos Anexados no Chat (PDF etc) */
.sc-attached-chat-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Animações Auxiliares Jarvis Call */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Ocultar Nuvem Global de Novidades e Modal de Notícias nas páginas do Jarvis Ally e Call */
#global-news-cloud,
.news-cloud-container,
#global-news-modal,
.news-modal {
    display: none !important;
}

/* --- Estilos para o Painel de Chamada Minimizado e Barra de Ações --- */

/* Esconde o tempo e o botão de voltar por padrão (desktop/imersivo) */
.sc-voice-actions .sc-voice-minimized-timer,
.sc-voice-actions .sc-voice-maximize {
    display: none !important;
}

/* Estilos de exibição na barra de ações quando minimizado (seletores redundantes de alta confiabilidade) - APENAS MOBILE */
@media screen and (max-width: 991px) {

    .sc-voice-overlay.minimized .sc-voice-actions .sc-voice-minimized-timer,
    body.sc-call-minimized .sc-voice-actions .sc-voice-minimized-timer,
    body.sc-call-minimized .sc-voice-minimized-timer {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.35rem 0.75rem !important;
        border-radius: 20px !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        color: #E4E4E7 !important;
        margin-right: 0.5rem !important;
    }

    .sc-voice-overlay.minimized .sc-voice-actions .sc-voice-maximize,
    body.sc-call-minimized .sc-voice-actions .sc-voice-maximize,
    body.sc-call-minimized .sc-voice-maximize {
        display: flex !important;
        background: rgba(139, 92, 246, 0.15) !important;
        border: 1px solid rgba(139, 92, 246, 0.35) !important;
        color: #C084FC !important;
        margin-right: 0.5rem !important;
    }

    .sc-voice-overlay.minimized .sc-voice-actions .sc-voice-maximize:hover,
    body.sc-call-minimized .sc-voice-actions .sc-voice-maximize:hover,
    body.sc-call-minimized .sc-voice-maximize:hover {
        background: rgba(139, 92, 246, 0.25) !important;
        border-color: rgba(139, 92, 246, 0.5) !important;
        color: #FAFAFA !important;
    }
}



/* Jarvis accessibility and safe agenda rendering */
:where(button, [role="button"], input, textarea, select, a):focus-visible {
    outline: 3px solid #a78bfa !important;
    outline-offset: 3px;
}

.sc-voice-agenda-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.sc-voice-agenda-card-title {
    color: #e4e4e7;
    font-size: 0.9rem;
    font-weight: 600;
}

.sc-voice-agenda-card-desc {
    color: #a1a1aa;
    font-size: 0.8rem;
}

.sc-voice-agenda-card-date {
    color: #a1a1aa;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

@supports (height: 100dvh) {
    .sc-app {
        min-height: 100dvh;
        height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   JARVIS VISUAL SYSTEM 2.0 — calm technical workspace
   ========================================================= */
.ai-chat-body {
    --sc-v2-bg: #080b10;
    --sc-v2-panel: #0d1219;
    --sc-v2-surface: #121923;
    --sc-v2-elevated: #17212c;
    --sc-v2-border: rgba(173, 194, 214, 0.12);
    --sc-v2-border-strong: rgba(173, 194, 214, 0.22);
    --sc-v2-text: #eef4f8;
    --sc-v2-muted: #9aabba;
    --sc-v2-subtle: #788895;
    --sc-v2-accent: #66afe7;
    --sc-v2-accent-strong: #9bd2f6;
    --sc-v2-accent-soft: rgba(102, 175, 231, 0.12);
    --sc-v2-warm: #e6ad67;
    --sc-v2-radius-sm: 10px;
    --sc-v2-radius: 14px;
    --sc-v2-radius-lg: 18px;
    height: 100vh;
    min-height: 100vh;
    color: var(--sc-v2-text);
    background:
        radial-gradient(circle at 55% -20%, rgba(70, 130, 180, 0.13), transparent 38%),
        var(--sc-v2-bg);
}

.sc-main,
.sc-sidebar {
    height: 100vh;
    min-height: 0;
}

.sc-main {
    overflow: hidden;
}

.sc-sidebar {
    width: 272px;
    flex-basis: 272px;
    background: rgba(11, 16, 23, 0.96);
    border-right: 1px solid var(--sc-v2-border);
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(14px);
}

.sc-sidebar-header {
    min-height: 68px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--sc-v2-border);
}

.sc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sc-v2-text);
}

.sc-brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(102, 175, 231, 0.35);
    border-radius: 11px;
    color: var(--sc-v2-accent-strong);
    background: var(--sc-v2-accent-soft);
    box-shadow: inset 0 0 18px rgba(102, 175, 231, 0.06);
}

.sc-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.1;
}

.sc-brand-copy strong {
    font-size: .91rem;
    letter-spacing: -.01em;
}

.sc-brand-copy small {
    margin-top: 4px;
    color: var(--sc-v2-muted);
    font-size: .67rem;
    font-weight: 500;
}

.sc-new-chat-btn {
    margin: 14px;
    width: calc(100% - 28px);
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(102, 175, 231, 0.32);
    color: var(--sc-v2-text);
    background: linear-gradient(180deg, rgba(102, 175, 231, .18), rgba(102, 175, 231, .10));
    box-shadow: none;
}

.sc-new-chat-btn:hover {
    transform: none;
    border-color: rgba(102, 175, 231, .55);
    background: rgba(102, 175, 231, .18);
}

.sc-sidebar-search {
    margin: 0 14px 10px;
    border: 1px solid var(--sc-v2-border);
    background: rgba(255, 255, 255, .025);
    border-radius: 11px;
}

.sc-sidebar-search:focus-within {
    border-color: rgba(102, 175, 231, .55);
    box-shadow: 0 0 0 3px rgba(102, 175, 231, .09);
}

.sc-conv-group-label {
    color: var(--sc-v2-muted);
    font-size: .72rem;
    letter-spacing: .08em;
}

.sc-conv-item {
    position: relative;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--sc-v2-muted);
}

.sc-conv-item.active {
    color: var(--sc-v2-text);
    border-color: var(--sc-v2-border);
    background: rgba(102, 175, 231, .08);
}

.sc-conv-item.active::before {
    content: "";
    position: absolute;
    inset: 8px auto 8px -1px;
    width: 2px;
    border-radius: 4px;
    background: var(--sc-v2-accent);
}

.sc-conv-item:focus-within .sc-conv-actions {
    display: flex;
}

.sc-sidebar-footer {
    border-top-color: var(--sc-v2-border);
    background: rgba(255, 255, 255, .012);
}

.sc-sidebar-memories-btn,
.sc-credits-display,
.sc-user-pill {
    border-color: var(--sc-v2-border);
    background: transparent;
}

.sc-sidebar-memories-btn {
    color: var(--sc-v2-muted);
}

.sc-sidebar-memories-btn:hover {
    color: var(--sc-v2-accent-strong);
    border-color: rgba(102, 175, 231, .3);
    background: var(--sc-v2-accent-soft);
}

.sc-credits-display,
.sc-credits-mini {
    color: var(--sc-v2-warm);
}

.sc-back-link {
    color: var(--sc-v2-muted);
}

.sc-topbar {
    min-height: 64px;
    height: 64px;
    padding: 0 18px;
    gap: 12px;
    background: rgba(8, 12, 17, 0.84);
    border-bottom: 1px solid var(--sc-v2-border);
    backdrop-filter: blur(16px);
}

.sc-topbar-left,
.sc-topbar-right {
    gap: 6px;
    min-width: 0;
}

.sc-model-btn,
.sc-persona-btn {
    min-height: 40px;
    border: 1px solid var(--sc-v2-border);
    border-radius: 11px;
    background: rgba(255, 255, 255, .025);
    color: var(--sc-v2-text);
    box-shadow: none;
}

.sc-model-btn:hover,
.sc-persona-btn:hover {
    border-color: var(--sc-v2-border-strong);
    background: rgba(255, 255, 255, .045);
}

.sc-model-icon,
.sc-persona-icon {
    color: var(--sc-v2-accent);
}

.sc-topbar-action,
.sc-menu-toggle {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--sc-v2-muted);
    background: transparent;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.sc-topbar-action:hover,
.sc-menu-toggle:hover {
    color: var(--sc-v2-text);
    border-color: var(--sc-v2-border);
    background: rgba(255, 255, 255, .045);
}

.sc-messages-area {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    background: transparent;
}

.sc-topbar,
.sc-input-area {
    flex-shrink: 0;
}

.sc-welcome {
    width: min(100%, 820px);
    min-height: 100%;
    margin: 0 auto;
    padding: clamp(28px, 7vh, 76px) 24px 32px;
    justify-content: center;
    text-align: left;
    align-items: flex-start;
}

.sc-welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--sc-v2-accent-strong);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.sc-welcome-icon {
    width: 58px;
    height: 58px;
    margin: 0 0 18px;
    border-radius: 17px;
    color: var(--sc-v2-accent-strong);
    border: 1px solid rgba(102, 175, 231, .35);
    background: var(--sc-v2-accent-soft);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .24);
    animation: none;
}

.sc-welcome-title {
    margin: 0 0 9px;
    color: var(--sc-v2-text);
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    letter-spacing: -.045em;
    line-height: 1.05;
}

.sc-welcome-subtitle {
    max-width: 610px;
    margin: 0;
    color: var(--sc-v2-muted);
    font-size: clamp(.94rem, 2vw, 1.06rem);
    line-height: 1.65;
}

.sc-welcome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 18px 0 24px;
    color: var(--sc-v2-muted);
    font-size: .76rem;
}

.sc-welcome-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sc-welcome-meta i {
    color: var(--sc-v2-accent);
}

.sc-suggestions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.sc-suggestion-card {
    min-height: 76px;
    padding: 15px 16px;
    border: 1px solid var(--sc-v2-border);
    border-radius: 13px;
    color: var(--sc-v2-text);
    background: rgba(255, 255, 255, .025);
    box-shadow: none;
}

.sc-suggestion-card:hover {
    transform: translateY(-1px);
    border-color: rgba(102, 175, 231, .35);
    background: rgba(102, 175, 231, .055);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.sc-disclaimer {
    max-width: 720px;
    margin-top: 20px;
    color: var(--sc-v2-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.sc-disclaimer span {
    color: var(--sc-v2-warm);
    font-weight: 650;
}

.sc-messages {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 24px 16px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.sc-message {
    animation-duration: .2s;
}

.sc-message-content {
    color: var(--sc-v2-text);
    font-size: .96rem;
    line-height: 1.68;
}

.sc-message.assistant {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 0 18px;
}

.sc-message.assistant .sc-message-content {
    padding-left: 0;
}

.sc-message.user {
    align-self: flex-end;
    margin-left: auto;
    max-width: min(80%, 620px);
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px 18px 4px 18px;
    background: #181d25 !important;
    padding: 12px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.sc-message.user .sc-message-header {
    display: none;
}

.sc-message.user .sc-message-content {
    padding: 0 !important;
    color: #f1f5f9;
}

.sc-message:hover .sc-msg-actions,
.sc-message:focus-within .sc-msg-actions {
    opacity: 1;
    visibility: visible;
}

.sc-message-content pre {
    max-width: 100%;
    border: 1px solid var(--sc-v2-border);
    border-radius: 12px;
    overflow-x: auto;
}

.sc-message-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.sc-input-area {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 8px 16px max(14px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

.sc-input-container {
    position: relative;
    width: 100%;
    min-height: 58px;
    padding: 9px 9px 9px 15px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    cursor: text;
    border: 1px solid var(--sc-v2-border-strong);
    border-radius: 17px;
    color: var(--sc-v2-text);
    background: rgba(18, 25, 35, .96);
    box-shadow: 0 16px 45px rgba(0, 0, 0, .28);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.sc-input-container::before {
    content: "";
    position: absolute;
    inset: -1px 16px auto;
    height: 1px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, var(--sc-v2-accent), transparent);
    transition: opacity .18s ease;
}

.sc-input-container:focus-within {
    border-color: rgba(102, 175, 231, .5);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32), 0 0 0 3px rgba(102, 175, 231, .08);
}

.sc-input-container:focus-within::before {
    opacity: 1;
}

.sc-input {
    min-height: 40px;
    max-height: 180px;
    padding: 9px 2px;
    color: var(--sc-v2-text);
    background: transparent;
    line-height: 1.5;
    cursor: text;
}

.sc-input::placeholder {
    color: var(--sc-v2-subtle);
}

.sc-input-actions {
    gap: 4px;
}

.sc-attach-btn,
.sc-voice-btn,
.sc-send-btn,
.sc-stop-btn {
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
}

.sc-send-btn:not(:disabled) {
    color: #071018;
    background: var(--sc-v2-accent-strong);
    box-shadow: none;
}

.sc-file-preview {
    width: 100%;
    margin-bottom: 7px;
    border: 1px solid var(--sc-v2-border);
    border-radius: 12px;
    background: var(--sc-v2-surface);
}

.sc-model-dropdown,
.sc-persona-dropdown {
    width: min(440px, calc(100vw - 24px));
    max-height: min(70dvh, 560px);
    border: 1px solid var(--sc-v2-border-strong);
    border-radius: 15px;
    background: rgba(13, 18, 25, .98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
    backdrop-filter: blur(18px);
}

.sc-model-search,
.sc-model-filters,
.sc-persona-header {
    background: rgba(13, 18, 25, .98);
}

.sc-model-option,
.sc-persona-option {
    min-height: 52px;
    border-radius: 10px;
}

.sc-model-option:hover,
.sc-persona-option:hover {
    background: rgba(102, 175, 231, .08);
}

.sc-modal-overlay {
    background: rgba(2, 5, 8, .76);
    backdrop-filter: blur(8px);
}

.sc-modal-container,
.sc-profile-container,
.sc-memories-container {
    width: min(92vw, 580px);
    max-height: min(84dvh, 720px);
    border: 1px solid var(--sc-v2-border-strong);
    border-radius: 17px;
    background: var(--sc-v2-panel);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

.sc-modal-header {
    border-bottom-color: var(--sc-v2-border);
    background: var(--sc-v2-panel);
}

.sc-modal-close {
    min-width: 44px;
    min-height: 44px;
}

.sc-memory-card,
.sc-voice-agenda-card {
    border-color: var(--sc-v2-border);
    background: rgba(255, 255, 255, .025);
}

.sc-voice-overlay {
    background: rgba(5, 8, 12, .96);
}

.sc-voice-container {
    width: min(100%, 1440px);
    height: 100vh;
    min-height: 0;
    margin: auto;
    color: var(--sc-v2-text);
}

.sc-voice-content {
    gap: clamp(14px, 2vw, 28px);
}

.sc-voice-reactor-container {
    transform: scale(.76);
    margin-block: -38px;
}

.sc-voice-transcript,
.sc-voice-agenda-section {
    border-color: var(--sc-v2-border);
    background: rgba(255, 255, 255, .025);
    box-shadow: none;
}

.sc-voice-actions button {
    min-width: 54px;
    min-height: 54px;
}

:where(button, [role="button"], input, textarea, select, a):focus-visible {
    outline: 2px solid var(--sc-v2-accent-strong) !important;
    outline-offset: 3px;
}

@supports (height: 100dvh) {

    .ai-chat-body,
    .sc-main,
    .sc-sidebar,
    .sc-voice-container,
    .sc-artifact-panel,
    .sc-math-panel {
        height: 100dvh;
        min-height: 0;
    }
}

@media (pointer: coarse) {

    .sc-conv-actions,
    .sc-msg-actions {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 1024px) {
    .sc-sidebar {
        width: 252px;
        flex-basis: 252px;
    }

    .sc-voice-left-panel {
        display: none;
    }

    .sc-voice-content {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    }
}

@media (max-width: 768px) {
    .sc-sidebar {
        width: min(88vw, 320px);
        flex-basis: auto;
        padding-top: env(safe-area-inset-top);
    }

    .sc-sidebar-close {
        display: inline-grid !important;
        place-items: center;
        width: 36px;
        height: 36px;
        border: 1px solid var(--jh-border);
        border-radius: 8px;
        color: var(--jh-muted);
        background: transparent;
        cursor: pointer;
    }

    .sc-sidebar-close:hover {
        color: var(--jh-text);
        border-color: var(--jh-border-strong);
        background: var(--jh-surface);
    }

    .sc-topbar {
        min-height: 58px;
        height: 58px;
        padding: env(safe-area-inset-top) 10px 0;
    }

    .sc-persona-selector,
    #sc-prompt-library-btn,
    #sc-add-note-btn,
    #sc-zen-mode-btn,
    .sc-credits-mini {
        display: none !important;
    }

    .sc-model-btn {
        max-width: min(52vw, 230px);
    }

    .sc-model-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sc-welcome {
        padding: 28px 16px 22px;
    }

    .sc-welcome-icon {
        width: 52px;
        height: 52px;
    }

    .sc-welcome-meta {
        gap: 7px 14px;
    }

    .sc-suggestions {
        grid-template-columns: 1fr;
    }

    .sc-suggestion-card {
        min-height: 66px;
    }

    .sc-messages {
        padding: 20px 13px 28px;
    }

    .sc-message.user {
        max-width: 90%;
    }

    .sc-message-content {
        padding-left: 0;
        font-size: .94rem;
    }

    .sc-input-area {
        padding-inline: 10px;
    }

    .sc-input-container {
        min-height: 56px;
        padding-left: 12px;
        border-radius: 15px;
    }

    .sc-model-dropdown {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: 440px !important;
        margin: 0 auto;
        top: auto !important;
        bottom: max(76px, calc(76px + env(safe-area-inset-bottom))) !important;
        max-height: min(48dvh, 390px) !important;
        height: auto !important;
        border-radius: 16px !important;
        display: none;
        flex-direction: column;
        z-index: 100005 !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    }

    .sc-persona-dropdown {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: 440px !important;
        margin: 0 auto;
        top: 62px !important;
        bottom: auto !important;
        max-height: min(48dvh, 390px) !important;
        height: auto !important;
        border-radius: 16px !important;
        display: none;
        flex-direction: column;
        z-index: 100005 !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    }

    .sc-model-dropdown.open,
    .sc-persona-dropdown.open {
        display: flex !important;
    }

    .sc-model-dropdown .sc-model-list,
    .sc-persona-dropdown .sc-persona-list {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .sc-voice-content {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .sc-voice-right-panel {
        width: 100%;
    }

    .sc-voice-actions {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .sc-welcome-eyebrow {
        margin-bottom: 13px;
    }

    .sc-welcome-meta span:nth-child(2) {
        display: none;
    }

    .sc-input-actions {
        gap: 2px;
    }

    .sc-voice-btn {
        display: none;
    }
}

@media (prefers-contrast: more) {
    .ai-chat-body {
        --sc-v2-border: rgba(255, 255, 255, .28);
        --sc-v2-border-strong: rgba(255, 255, 255, .46);
        --sc-v2-muted: #c5d0d8;
    }
}

@media (forced-colors: active) {
    :where(button, [role="button"], input, textarea, select, a):focus-visible {
        outline: 2px solid CanvasText !important;
    }

}

/* =========================================================
   JARVIS HERMES 3.0 — flat, quiet, tool-first
   ========================================================= */
.ai-chat-body {
    --jh-bg: #0b0e12;
    --jh-sidebar: #0d1015;
    --jh-surface: #11151b;
    --jh-surface-hover: #151a21;
    --jh-border: #252b34;
    --jh-border-strong: #343c47;
    --jh-text: #eef1f5;
    --jh-muted: #9aa4b2;
    --jh-subtle: #697482;
    --jh-accent: #8ab4f8;
    color: var(--jh-text);
    background: var(--jh-bg) !important;
}

.ai-chat-body *,
.ai-chat-body *::before,
.ai-chat-body *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.ai-chat-body :where(.sc-welcome-icon, .sc-brand-mark, .sc-topbar, .sc-sidebar, .sc-input-area,
    .sc-input-container, .sc-new-chat-btn, .sc-suggestion-card, .sc-model-dropdown,
    .sc-persona-dropdown, .sc-modal-container, .sc-profile-container, .sc-memories-container,
    .sc-message.user, .sc-voice-overlay, .sc-voice-container) {
    background-image: none !important;
}

.sc-sidebar {
    width: 260px;
    flex-basis: 260px;
    background: var(--jh-sidebar) !important;
    border-right: 1px solid var(--jh-border);
}

.sc-sidebar-header {
    min-height: 60px;
    padding: 10px 14px;
    border-color: var(--jh-border);
}

.sc-brand {
    gap: 9px;
}

.sc-brand-mark {
    display: inline-flex;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--jh-text);
    background: transparent !important;
    font-size: 1rem;
}

.sc-brand-copy strong {
    font-size: .88rem;
}

.sc-brand-copy small {
    color: var(--jh-subtle);
    font-size: .64rem;
}

.sc-menu-toggle,
.sc-topbar-action {
    border-radius: 8px;
}

.sc-new-chat-btn {
    min-height: 40px;
    margin: 12px;
    width: calc(100% - 24px);
    border: 1px solid var(--jh-border-strong);
    border-radius: 9px;
    color: var(--jh-text);
    background: var(--jh-surface) !important;
}

.sc-new-chat-btn:hover {
    border-color: #46505d;
    background: var(--jh-surface-hover) !important;
}

.sc-sidebar-search {
    margin-inline: 12px;
    border-color: var(--jh-border);
    border-radius: 8px;
    background: transparent;
}

.sc-sidebar-search:focus-within {
    border-color: var(--jh-border-strong);
}

.sc-conv-group-label {
    color: var(--jh-subtle);
}

.sc-conv-item {
    color: var(--jh-muted);
    border-radius: 7px;
}

.sc-conv-item:hover {
    background: var(--jh-surface);
    color: var(--jh-text);
}

.sc-conv-item.active {
    border-color: transparent;
    color: var(--jh-text);
    background: var(--jh-surface-hover);
}

.sc-conv-item.active::before {
    background: var(--jh-muted);
}

.sc-sidebar-footer {
    border-color: var(--jh-border);
    background: var(--jh-sidebar);
}

.sc-sidebar-memories-btn,
.sc-credits-display,
.sc-user-pill {
    border-color: var(--jh-border);
    border-radius: 8px;
    color: var(--jh-muted);
    background: transparent;
}

.sc-sidebar-memories-btn:hover {
    color: var(--jh-text);
    border-color: var(--jh-border-strong);
    background: var(--jh-surface);
}

.sc-topbar {
    height: 58px;
    min-height: 58px;
    padding-inline: 14px;
    border-color: var(--jh-border);
    background: var(--jh-bg) !important;
}

.sc-model-btn,
.sc-persona-btn {
    min-height: 36px;
    padding-block: 0;
    border-color: var(--jh-border);
    border-radius: 8px;
    color: var(--jh-text);
    background: transparent;
}

.sc-model-btn:hover,
.sc-persona-btn:hover,
.sc-topbar-action:hover,
.sc-menu-toggle:hover {
    border-color: var(--jh-border-strong);
    color: var(--jh-text);
    background: var(--jh-surface);
}

.sc-model-icon,
.sc-persona-icon {
    color: var(--jh-muted);
}

.sc-topbar-action,
.sc-menu-toggle {
    color: var(--jh-muted);
}

.sc-welcome {
    width: min(100%, 760px);
    padding: clamp(24px, 6vh, 58px) 20px 28px;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.sc-welcome-eyebrow {
    display: none;
}

.sc-welcome-icon {
    display: inline-flex;
    width: auto;
    height: auto;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--jh-text);
    background: transparent !important;
    font-size: 1.35rem;
}

.sc-welcome-title {
    margin-bottom: 10px;
    color: var(--jh-text);
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    font-weight: 650;
    letter-spacing: -.035em;
}

.sc-welcome-subtitle {
    max-width: 570px;
    color: var(--jh-muted);
    font-size: .98rem;
    line-height: 1.6;
}

.sc-welcome-meta {
    display: none;
}

.sc-suggestions {
    margin-top: 30px;
    gap: 8px;
}

.sc-suggestion-card {
    min-height: 62px;
    padding: 13px 14px;
    border-color: var(--jh-border);
    border-radius: 9px;
    color: var(--jh-muted);
    background: transparent;
}

.sc-suggestion-card:hover {
    transform: none;
    border-color: var(--jh-border-strong);
    color: var(--jh-text);
    background: var(--jh-surface);
}

.sc-disclaimer {
    color: var(--jh-subtle);
}

.sc-messages {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 24px 16px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.sc-message.assistant {
    width: 100%;
    max-width: 100%;
    padding: 16px 0 22px 0;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: transparent !important;
}

.sc-message.assistant:last-child {
    border-bottom: none !important;
}

.sc-message.assistant .sc-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sc-message.assistant .sc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.sc-message.assistant .sc-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-message.assistant .sc-msg-role {
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--jh-text);
    letter-spacing: -0.01em;
}

.sc-message.assistant .sc-msg-model {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--jh-border);
    color: var(--jh-muted);
    font-size: 0.72rem;
    font-weight: 500;
    font-family: inherit;
    margin-left: 4px;
}

.sc-message.assistant .sc-message-content {
    padding-left: 0;
    margin-top: 6px;
    color: var(--jh-text);
    font-size: 0.96rem;
    line-height: 1.72;
}

.sc-message.user {
    align-self: flex-end;
    margin-left: auto;
    max-width: min(80%, 620px);
    width: fit-content;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #181d25 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.sc-message.user .sc-message-header {
    display: none;
}

.sc-message.user .sc-message-content {
    padding: 0 !important;
    color: #f1f5f9;
    font-size: 0.95rem;
    line-height: 1.6;
}

.sc-input-area {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 6px 16px max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    background: transparent !important;
}

.sc-auto-capabilities {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 25px;
    padding: 0 3px;
    color: var(--jh-subtle);
    font-size: .74rem;
    user-select: none;
}

.sc-auto-capabilities i {
    color: var(--jh-muted);
}

.sc-input-container {
    position: relative;
    width: 100%;
    min-height: 56px;
    padding: 8px 10px 8px 14px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border: 1px solid var(--jh-border-strong);
    border-radius: 12px;
    color: var(--jh-text);
    background: var(--jh-surface) !important;
    box-sizing: border-box;
}

.sc-input-container::before {
    display: none;
}

.sc-input-container:focus-within {
    border-color: #5865F2;
}

.sc-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 38px;
    max-height: 180px;
    padding: 8px 2px !important;
    background: transparent !important;
    border: none !important;
    color: var(--jh-text);
    font-size: 0.94rem;
    line-height: 1.55;
    resize: none;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
    box-sizing: border-box;
}

.sc-input::placeholder {
    color: var(--jh-subtle);
}

.sc-attach-btn,
.sc-voice-btn,
.sc-send-btn,
.sc-stop-btn {
    border-radius: 8px;
    color: var(--jh-muted);
}

.sc-attach-btn:hover {
    color: var(--jh-text);
    background: var(--jh-surface-hover);
}

.sc-send-btn:not(:disabled) {
    color: #0b0e12;
    background: #dce5f2;
}

.sc-file-preview {
    border-color: var(--jh-border);
    border-radius: 8px;
    background: var(--jh-surface);
}

.sc-model-dropdown,
.sc-persona-dropdown,
.sc-modal-container,
.sc-profile-container,
.sc-memories-container {
    border-color: var(--jh-border-strong);
    border-radius: 11px;
    background: var(--jh-sidebar);
}

.sc-model-search,
.sc-model-filters,
.sc-persona-header,
.sc-modal-header {
    background: var(--jh-sidebar);
    border-color: var(--jh-border);
}

.sc-model-option:hover,
.sc-persona-option:hover {
    background: var(--jh-surface);
}

.sc-memory-card,
.sc-voice-agenda-card {
    border-color: var(--jh-border);
    border-radius: 8px;
    background: var(--jh-surface);
}

.sc-memories-description {
    margin: 0 0 16px;
    color: var(--jh-muted);
    font-size: .82rem;
    line-height: 1.55;
}

.sc-memory-consent {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--jh-border);
    border-radius: 10px;
    color: var(--jh-text);
    background: var(--jh-surface);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sc-memory-consent:hover {
    border-color: var(--jh-border-strong);
    background: var(--jh-surface-hover);
}

.sc-memory-consent-text {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--jh-text);
    flex: 1;
}

/* Custom Sleek Switch Slider */
.sc-switch-track {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    min-width: 38px;
    max-width: 38px;
    min-height: 22px;
    max-height: 22px;
    flex: 0 0 38px;
    margin: 0;
    vertical-align: middle;
}

.sc-switch-track input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.sc-switch-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #181d24;
    border: 1px solid var(--jh-border-strong);
    border-radius: 999px;
    transition: background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease;
    box-sizing: border-box;
}

.sc-switch-slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background: #71717A;
    border-radius: 50%;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.22s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.sc-switch-track input:checked+.sc-switch-slider {
    background: #7C3AED;
    border-color: #8B5CF6;
}

.sc-switch-track input:checked+.sc-switch-slider::before {
    transform: translateX(16px);
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sc-memories-form {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

#sc-memories-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--jh-border);
    border-radius: 8px;
    color: var(--jh-text);
    background: var(--jh-surface);
    outline: 0;
}

#sc-memories-input:focus {
    border-color: var(--jh-border-strong);
}

.sc-memories-form .sc-btn-primary {
    padding: 9px 14px;
    border: 1px solid var(--jh-border-strong);
    border-radius: 8px;
    color: var(--jh-text);
    background: #202731;
}

.sc-memories-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

/* Camadas inativas nunca podem capturar mouse, roda ou toque. */
.sc-overlay:not(.active),
.sc-modal-overlay:not(.active),
.sc-image-modal:not(.active),
.sc-voice-overlay:not(.active) {
    display: none !important;
    pointer-events: none !important;
}

.sc-math-panel:not(.active),
.sc-artifact-panel:not(.active) {
    visibility: hidden;
    pointer-events: none !important;
}

.sc-math-panel.active,
.sc-artifact-panel.active {
    visibility: visible;
    pointer-events: auto !important;
}

.sc-messages-area {
    flex: 1 1 auto;
    min-height: 0;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sc-sidebar {
        width: min(88vw, 300px);
    }

    .sc-topbar {
        height: 54px;
        min-height: 54px;
    }

    .sc-welcome {
        padding-inline: 18px;
    }

    .sc-suggestions {
        grid-template-columns: 1fr;
    }

    .sc-input-area {
        padding-inline: 9px;
    }

    .sc-auto-capabilities {
        padding-left: 4px;
    }
}

/* ==========================================================================
   PROMPT INPUT SYSTEM (Spring Physics & Modern Glassmorphism Architecture)
   ========================================================================== */

:root {
    --prompt-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --prompt-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --prompt-bg: rgba(18, 22, 32, 0.82);
    --prompt-border: rgba(255, 255, 255, 0.08);
    --prompt-border-hover: rgba(99, 102, 241, 0.35);
    --prompt-border-focus: rgba(99, 102, 241, 0.55);
    --prompt-glow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(99, 102, 241, 0.15);
    --prompt-pill-bg: rgba(255, 255, 255, 0.05);
    --prompt-pill-hover: rgba(255, 255, 255, 0.1);
    --prompt-pill-border: rgba(255, 255, 255, 0.08);
}

.sc-prompt-wrapper {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: max-width 0.4s var(--prompt-spring);
}

/* Custom Scrollbar for Prompt Component */
.prompt-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.prompt-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.prompt-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.prompt-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}

.prompt-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ----------------------------------------------------------------------
   Independent Attachment Drawer (Tab Above Card)
   ---------------------------------------------------------------------- */
.sc-prompt-attachments-tab {
    position: relative;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.98);
    transform-origin: bottom center;
    transition: max-height 0.35s var(--prompt-spring),
        opacity 0.25s ease-out,
        transform 0.35s var(--prompt-spring),
        margin-bottom 0.3s ease-out;
}

.sc-prompt-attachments-tab.open {
    max-height: 120px;
    opacity: 1;
    overflow: visible;
    margin-bottom: 8px;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.sc-prompt-attachments-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

/* Attachment Card Item */
.sc-prompt-attach-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 6px;
    background: rgba(24, 28, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    cursor: default;
    animation: promptAttachPop 0.35s var(--prompt-spring) forwards;
}

@keyframes promptAttachPop {
    0% {
        transform: scale(0.8) translateY(8px);
        opacity: 0;
    }

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

.sc-prompt-attach-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.sc-prompt-attach-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.sc-prompt-attach-thumb:hover img {
    transform: scale(1.15);
}

.sc-prompt-attach-thumb i {
    font-size: 1.1rem;
}

.sc-prompt-attach-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 120px;
}

.sc-prompt-attach-name {
    font-size: 0.76rem;
    font-weight: 500;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-prompt-attach-size {
    font-size: 0.68rem;
    color: #94a3b8;
}

.sc-prompt-attach-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 2px;
}

.sc-prompt-attach-remove:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    transform: scale(1.1);
}

/* ----------------------------------------------------------------------
   Main Prompt Card
   ---------------------------------------------------------------------- */
.sc-prompt-card {
    position: relative;
    width: 100%;
    min-height: 52px;
    background: var(--prompt-bg);
    border: 1px solid var(--prompt-border);
    border-radius: 24px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    overflow: visible;
    transition: border-color 0.2s ease,
        box-shadow 0.2s ease,
        min-height 0.2s ease,
        background 0.2s ease;
}

.sc-prompt-card:hover {
    border-color: var(--prompt-border-hover);
}

.sc-prompt-card:focus-within {
    border-color: var(--prompt-border-focus);
    box-shadow: var(--prompt-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(18, 22, 32, 0.94);
}

/* Gradient Fade Masks */
.sc-prompt-fade-top {
    position: absolute;
    top: 1px;
    left: 20px;
    right: 50px;
    height: 12px;
    background: linear-gradient(to bottom, rgba(18, 22, 32, 0.95), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transition: opacity 0.2s ease;
}

.sc-prompt-fade-bottom {
    position: absolute;
    bottom: 46px;
    left: 20px;
    right: 50px;
    height: 12px;
    background: linear-gradient(to top, rgba(18, 22, 32, 0.95), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sc-prompt-card.has-scroll .sc-prompt-fade-top,
.sc-prompt-card.has-scroll .sc-prompt-fade-bottom {
    opacity: 1;
}

/* Seamless Auto-Resizing Textarea */
.sc-prompt-textarea {
    width: calc(100% - 54px);
    min-height: 44px;
    max-height: 180px;
    padding: 13px 18px 8px 18px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.5;
    resize: none;
    overflow-y: auto;
    scrollbar-gutter: stable;
    box-sizing: border-box;
    display: block;
}

.sc-prompt-card.has-scroll .sc-prompt-textarea {
    overflow-y: auto;
}

.sc-prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

/* ----------------------------------------------------------------------
   Bottom Bar & Interactive Pills
   ---------------------------------------------------------------------- */
.sc-prompt-bottom-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 50px 8px 14px;
    flex-wrap: wrap;
    z-index: 10;
}

.sc-prompt-pill {
    height: 30px;
    padding: 0 10px;
    background: var(--prompt-pill-bg);
    border: 1px solid var(--prompt-pill-border);
    border-radius: 9999px;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    user-select: none;
    transition: all 0.2s ease;
}

.sc-prompt-pill:hover {
    background: var(--prompt-pill-hover);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sc-prompt-pill:active {
    transform: translateY(0) scale(0.97);
}

.sc-prompt-morph-text {
    display: inline-block;
    transition: transform 0.2s var(--prompt-smooth), opacity 0.2s ease;
}

/* Model Selector Wrapper inside Bottom Bar */
.sc-prompt-model-wrapper {
    position: relative;
}

.sc-prompt-model-pill {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.22);
}

.sc-prompt-model-pill:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.38);
    color: #ffffff;
}

.sc-prompt-model-icon {
    font-size: 0.82rem;
    color: #818cf8;
}

.sc-prompt-chevron {
    font-size: 0.62rem;
    color: #94a3b8;
    margin-left: 0.25rem;
    transition: transform 0.25s var(--prompt-spring);
}

/* Attach Button (+) */
.sc-prompt-attach-btn {
    width: 30px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.sc-prompt-attach-btn.has-file {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #818cf8;
}

/* Dynamic Thinking Effort Pill (IDE-style Low / Medium / High) */
.sc-prompt-thinking-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    outline: none;
}

.sc-prompt-thinking-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: scale(1.02);
}

.sc-prompt-thinking-pill:active {
    transform: scale(0.96);
}

.sc-dynamic-bars-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #ffffff;
}

.sc-dynamic-bars-icon rect {
    transition: opacity 0.25s ease-out;
}

.sc-thinking-pill-text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sc-prompt-thinking-pill:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ----------------------------------------------------------------------
   Fluid, Clean & High-End Streaming Typography and Caret
   ---------------------------------------------------------------------- */
.sc-reply-content {
    color: #e4e4e7;
    font-size: 0.95rem;
    line-height: 1.75;
    word-break: break-word;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sc-message.assistant.streaming .sc-reply-content {
    position: relative;
}

.sc-streaming-caret {
    display: inline-block;
    width: 3px;
    height: 1.15em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: #6366F1;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8), 0 0 2px #A5B4FC;
    animation: scCaretPulse 0.8s ease-in-out infinite alternate;
    pointer-events: none;
    flex-shrink: 0;
}

@keyframes scCaretPulse {
    0% {
        opacity: 0.25;
    }
    100% {
        opacity: 1;
    }
}

.sc-cursor-typing {
    display: inline-block;
    width: 3px;
    height: 1.15em;
    background: #6366F1;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
    animation: scCaretPulse 0.8s ease-in-out infinite alternate;
    color: transparent;
    user-select: none;
}

/* ----------------------------------------------------------------------
   Audio Waves Visualizer Overlay
   ---------------------------------------------------------------------- */
.sc-prompt-audio-waves {
    display: none;
    align-items: center;
    gap: 3px;
    height: 18px;
    margin-left: 4px;
}

.sc-prompt-audio-waves.active {
    display: inline-flex;
}

.sc-prompt-audio-waves .wave-bar {
    width: 3px;
    height: 6px;
    border-radius: 9999px;
    background: #818cf8;
    animation: promptWavePulse 0.8s ease-in-out infinite alternate;
}

.sc-prompt-audio-waves .wave-bar:nth-child(1) {
    animation-delay: 0.0s;
    height: 8px;
}

.sc-prompt-audio-waves .wave-bar:nth-child(2) {
    animation-delay: 0.15s;
    height: 16px;
}

.sc-prompt-audio-waves .wave-bar:nth-child(3) {
    animation-delay: 0.3s;
    height: 12px;
}

.sc-prompt-audio-waves .wave-bar:nth-child(4) {
    animation-delay: 0.45s;
    height: 18px;
}

.sc-prompt-audio-waves .wave-bar:nth-child(5) {
    animation-delay: 0.6s;
    height: 10px;
}

@keyframes promptWavePulse {
    0% {
        transform: scaleY(0.3);
        opacity: 0.5;
    }

    100% {
        transform: scaleY(1.2);
        opacity: 1;
    }
}

/* ----------------------------------------------------------------------
   Morphing Circular Primary Action Button (Bottom Right)
   ---------------------------------------------------------------------- */
.sc-prompt-action-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: all 0.28s var(--prompt-spring);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sc-action-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: transform 0.25s var(--prompt-spring), opacity 0.2s ease;
}

/* State 1: Mic (Idle / Dictation ready) */
.sc-prompt-action-btn.state-mic {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-prompt-action-btn.state-mic:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: scale(1.06);
}

.sc-prompt-action-btn.state-mic .sc-action-mic {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.sc-prompt-action-btn.state-mic .sc-action-arrow {
    opacity: 0;
    transform: scale(0.4) rotate(-45deg);
}

.sc-prompt-action-btn.state-mic .sc-action-stop {
    opacity: 0;
    transform: scale(0.4);
}

/* State 2: Arrow (Text entered / Send prompt ready) */
.sc-prompt-action-btn.state-arrow {
    background: #ffffff;
    color: #0b0e14;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.35);
}

.sc-prompt-action-btn.state-arrow:hover {
    background: #f1f5f9;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}

.sc-prompt-action-btn.state-arrow .sc-action-mic {
    opacity: 0;
    transform: scale(0.4) rotate(45deg);
}

.sc-prompt-action-btn.state-arrow .sc-action-arrow {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.sc-prompt-action-btn.state-arrow .sc-action-stop {
    opacity: 0;
    transform: scale(0.4);
}

/* State 3: Stop (Generating response) */
.sc-prompt-action-btn.state-stop {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    animation: promptStopPulse 1.5s infinite;
}

.sc-prompt-action-btn.state-stop:hover {
    background: #dc2626;
    transform: scale(1.08);
}

.sc-prompt-action-btn.state-stop .sc-action-mic {
    opacity: 0;
    transform: scale(0.4);
}

.sc-prompt-action-btn.state-stop .sc-action-arrow {
    opacity: 0;
    transform: scale(0.4);
}

.sc-prompt-action-btn.state-stop .sc-action-stop {
    opacity: 1;
    transform: scale(1);
}

@keyframes promptStopPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Garantir que botões legados nunca renderizem no novo input */
#sc-send-btn,
#sc-stop-btn,
#sc-voice-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ----------------------------------------------------------------------
   Lightbox Gallery Modal for Attachments
   ---------------------------------------------------------------------- */
.sc-prompt-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: promptGalleryFadeIn 0.25s ease-out;
}

@keyframes promptGalleryFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.sc-prompt-gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sc-prompt-gallery-container {
    position: relative;
    max-width: min(90vw, 900px);
    max-height: min(85vh, 700px);
    z-index: 2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: promptGalleryZoom 0.35s var(--prompt-spring);
}

@keyframes promptGalleryZoom {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.sc-prompt-gallery-container img {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.sc-prompt-gallery-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.sc-prompt-gallery-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ----------------------------------------------------------------------
   Mobile Adaptations
   ---------------------------------------------------------------------- */
@media (max-width: 640px) {
    .sc-prompt-card {
        border-radius: 20px;
    }

    .sc-prompt-textarea {
        padding: 10px 14px 6px 14px;
        font-size: 0.9rem;
    }

    .sc-prompt-bottom-bar {
        padding: 2px 46px 6px 10px;
        gap: 4px;
    }

    .sc-prompt-pill {
        height: 28px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .sc-prompt-action-btn {
        width: 32px;
        height: 32px;
        right: 6px;
        bottom: 6px;
    }
}

/* Memory bulk selection — flat Hermes treatment */
.sc-memories-bulk-actions {
    min-height: 46px;
    margin: 8px 0 10px;
    padding: 0 2px 10px;
    gap: 10px;
    border-bottom: 1px solid var(--jh-border, #26303b);
}

.sc-memories-select-all-label,
.sc-memory-select-label {
    user-select: none;
}

.sc-memory-select,
#sc-memories-select-all {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    border: 1px solid #53606e;
    border-radius: 5px;
    background: #11171e;
    box-shadow: none;
    display: inline-grid;
    place-content: center;
    transition: border-color 120ms ease, background-color 120ms ease;
}

.sc-memory-select::after,
#sc-memories-select-all::after {
    content: '';
    width: 9px;
    height: 5px;
    border-left: 2px solid #071018;
    border-bottom: 2px solid #071018;
    transform: rotate(-45deg) translateY(-1px) scale(0);
    transform-origin: center;
    transition: transform 100ms ease;
}

.sc-memory-select:checked,
#sc-memories-select-all:checked {
    border-color: #7fc2ef;
    background: #7fc2ef;
}

.sc-memory-select:checked::after,
#sc-memories-select-all:checked::after {
    transform: rotate(-45deg) translateY(-1px) scale(1);
}

#sc-memories-select-all:indeterminate {
    border-color: #7fc2ef;
    background: linear-gradient(#7fc2ef, #7fc2ef) center / 9px 2px no-repeat #17222c;
}

.sc-memory-select:focus-visible,
#sc-memories-select-all:focus-visible {
    outline: 2px solid #a5d7f7;
    outline-offset: 2px;
}

#sc-memories-selection-count {
    color: #778391;
    font-variant-numeric: tabular-nums;
}

#sc-memories-delete-selected {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #71343d;
    border-radius: 8px;
    background: #2a171c;
    color: #f3a7b1;
    font-size: 0.78rem;
    font-weight: 650;
    box-shadow: none;
    transform: none;
}

#sc-memories-delete-selected:hover:not(:disabled) {
    border-color: #9a4652;
    background: #351b21;
    color: #ffc1c8;
    transform: none;
}

#sc-memories-delete-selected:disabled {
    border-color: #29323c;
    background: #141a20;
    color: #69737e;
    opacity: 1;
}

.sc-memory-card.is-selected {
    border-color: #39566a;
    background: #141d25;
}

@media (max-width: 560px) {
    .sc-memories-bulk-actions {
        padding-inline: 0;
    }

    #sc-memories-delete-selected {
        min-height: 40px;
    }
}

/* ========================================================================== */
/*                CREDIT ALERTS & LOW/EXHAUSTED NOTIFICATIONS                 */
/* ========================================================================== */

.sc-credit-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    border-radius: 14px;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: scAlertSlideUp 0.35s ease-out;
}

@keyframes scAlertSlideUp {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sc-credit-alert-banner.hidden {
    display: none !important;
}

/* Variant 1: Warning / Low Credits (<= 25% restantes) */
.sc-credit-alert-banner.sc-credit-alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(180, 83, 9, 0.08) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.sc-credit-alert-banner.sc-credit-alert-warning .sc-credit-alert-icon {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.sc-credit-alert-banner.sc-credit-alert-warning .sc-btn-upgrade {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #09090B;
    font-weight: 750;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.sc-credit-alert-banner.sc-credit-alert-warning .sc-btn-upgrade:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

/* Variant 2: Exhausted / 0% Remaining (0 créditos restantes) */
.sc-credit-alert-banner.sc-credit-alert-exhausted {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(185, 28, 28, 0.12) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.2);
}

.sc-credit-alert-banner.sc-credit-alert-exhausted .sc-credit-alert-icon {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: scPulseIcon 1.8s infinite;
}

@keyframes scPulseIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
    }
}

.sc-credit-alert-banner.sc-credit-alert-exhausted .sc-btn-upgrade {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    font-weight: 750;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
    animation: scButtonPulse 2.4s infinite;
}

@keyframes scButtonPulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 4px 18px rgba(239, 68, 68, 0.65);
    }
}

.sc-credit-alert-banner.sc-credit-alert-exhausted .sc-btn-upgrade:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.sc-credit-alert-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.sc-credit-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sc-credit-alert-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sc-credit-alert-text strong {
    font-size: 0.85rem;
    color: #FFFFFF;
    font-weight: 700;
    line-height: 1.2;
}

.sc-credit-alert-text p {
    font-size: 0.76rem;
    color: #D4D4D8;
    margin: 0;
    line-height: 1.35;
    opacity: 0.9;
}

.sc-credit-alert-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sc-credit-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sc-credit-alert-btn.sc-btn-recharge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-weight: 600;
}

.sc-credit-alert-btn.sc-btn-recharge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.sc-credit-alert-dismiss {
    background: transparent;
    border: none;
    color: #A1A1AA;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sc-credit-alert-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

/* Indicators on Credits Pill */
.sc-credits-display.sc-credits-low {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.sc-credits-display.sc-credits-low #sc-credits-count {
    color: #F59E0B;
}

.sc-credits-display.sc-credits-exhausted {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.sc-credits-display.sc-credits-exhausted #sc-credits-count {
    color: #EF4444;
}

.sc-credits-mini.sc-credits-low {
    color: #F59E0B;
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.08);
}

.sc-credits-mini.sc-credits-exhausted {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

/* High Conversion Error Card for Low/Exhausted Credits */
.sc-error-card.is-credits-error {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(20, 10, 15, 0.9) 100%);
}

.sc-error-card.is-credits-error .sc-btn-upgrade-highlight {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #000;
    font-weight: 750;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.sc-error-card.is-credits-error .sc-btn-recharge-highlight {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: #FFF;
    font-weight: 650;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

@media (max-width: 680px) {
    .sc-credit-alert-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .sc-credit-alert-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .sc-credit-alert-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   LOUSA DE CÁLCULO / QUADRO NEGRO MATEMÁTICO (/lousa)
   ========================================================================== */
.sc-math-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    margin-top: 0.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.sc-math-badge:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.18) 100%);
    border-color: rgba(52, 211, 153, 0.6);
    color: #a7f3d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.sc-math-badge:active {
    transform: translateY(0);
}

.sc-math-badge i {
    font-size: 0.9rem;
    color: #34d399;
}

/* Mobile density pass — message tools and composer */
@media (max-width: 600px) {
    .sc-messages {
        padding: 10px 12px 18px;
        gap: 8px;
    }

    .sc-message.assistant {
        padding: 9px 0 13px;
    }

    .sc-message.assistant .sc-message-header {
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 8px;
        row-gap: 4px;
        margin-bottom: 6px;
    }

    .sc-message.assistant .sc-msg-avatar {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: start;
        width: 26px;
        height: 26px;
        border-radius: 7px;
        box-shadow: none;
    }

    .sc-message.assistant .sc-msg-role {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        min-width: 0;
        font-size: 0.82rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    .sc-message.assistant .sc-msg-model {
        grid-column: 3;
        grid-row: 1;
        max-width: 118px;
        margin-left: 0;
        padding: 2px 6px;
        gap: 4px;
        overflow: hidden;
        font-size: 0.66rem;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sc-message.assistant .sc-msg-model i {
        flex: 0 0 auto;
    }

    .sc-message.assistant .sc-msg-actions {
        grid-column: 2 / -1;
        grid-row: 2;
        display: flex;
        gap: 1px;
        width: fit-content;
        margin: 0;
        opacity: 0.78;
        visibility: visible;
    }

    .sc-message.assistant .sc-msg-action-btn {
        width: 25px;
        height: 25px;
        padding: 0;
        font-size: 0.7rem;
    }

    .sc-message.assistant .sc-audio-waves {
        display: none !important;
    }

    .sc-message.assistant .sc-message-content {
        margin-top: 3px;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .sc-message.assistant .sc-message-content > :first-child {
        margin-top: 0;
    }

    .sc-message.assistant .sc-message-content p {
        margin-block: 0.45rem;
    }

    .sc-message.user {
        max-width: 88%;
        padding: 9px 12px;
        border-radius: 15px 15px 4px 15px;
    }

    .sc-message.user .sc-message-content {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .sc-input-area {
        gap: 0;
        padding: 5px 8px max(8px, env(safe-area-inset-bottom));
    }

    .sc-auto-capabilities {
        display: none !important;
    }

    .sc-prompt-card {
        min-height: 48px;
        border-radius: 18px;
    }

    .sc-prompt-textarea {
        width: calc(100% - 46px);
        min-height: 38px;
        max-height: 120px;
        padding: 10px 14px 5px;
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .sc-prompt-bottom-bar {
        gap: 4px;
        padding: 3px 44px 7px 10px;
    }

    .sc-prompt-pill {
        height: 27px;
        padding-inline: 8px;
        gap: 4px;
        font-size: 0.69rem;
    }

    .sc-prompt-model-pill {
        max-width: min(170px, calc(100vw - 118px));
        overflow: hidden;
    }

    .sc-prompt-morph-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sc-prompt-attach-btn {
        width: 27px;
        padding: 0;
    }

    .sc-prompt-action-btn {
        right: 6px;
        bottom: 6px;
        width: 32px;
        height: 32px;
        box-shadow: none;
    }

    .sc-generated-image {
        max-height: none;
        border-radius: 10px;
    }
}
/* Jarvis API — painel de integrações sem glow ou sombras */
.sc-jarvis-api-container { max-width: 680px; width: min(92vw, 680px); box-shadow: none !important; }
.sc-jarvis-api-kicker { color: #9b87f5; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.sc-jarvis-api-body { display: grid; gap: 18px; }
.sc-jarvis-api-body > p { margin: 0; color: #a7a7b2; line-height: 1.55; }
.sc-jarvis-api-endpoint, .sc-jarvis-api-key { border: 1px solid #30303a; border-radius: 12px; background: #101015; box-shadow: none; }
.sc-jarvis-api-endpoint { display: grid; gap: 7px; padding: 14px; }
.sc-jarvis-api-endpoint span, .sc-jarvis-api-form label { color: #8f8f9b; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.sc-jarvis-api-endpoint code, .sc-jarvis-api-secret code, .sc-jarvis-api-key code { overflow-wrap: anywhere; color: #d7d2ff; }
.sc-jarvis-api-form { display: grid; gap: 8px; }
.sc-jarvis-api-form > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.sc-jarvis-api-form input, .sc-jarvis-api-form button, .sc-jarvis-api-secret button, .sc-jarvis-api-key button { min-height: 42px; border: 1px solid #353540; border-radius: 10px; background: #17171d; color: #f5f5f7; padding: 0 14px; box-shadow: none; }
.sc-jarvis-api-form button { background: #6d3bea; border-color: #8159e8; font-weight: 750; }
.sc-jarvis-api-secret { border: 1px solid #30303a; border-radius: 12px; background: #101015; box-shadow: none; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px; }
.sc-jarvis-api-secret:empty, .sc-jarvis-api-secret[hidden] { display: none !important; margin: 0 !important; padding: 0 !important; border: none !important; }
.sc-jarvis-api-secret strong { grid-column: 1 / -1; color: #f2c76e; }
.sc-jarvis-api-list { display: grid; gap: 8px; }
.sc-jarvis-api-key { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; }
.sc-jarvis-api-key > div { min-width: 0; display: grid; gap: 5px; }
.sc-jarvis-api-key button { color: #ff8797; border-color: #5a3038; }
.sc-jarvis-api-key button:disabled { opacity: .45; }
.sc-jarvis-api-empty { margin: 0; padding: 22px; border: 1px dashed #363640; border-radius: 12px; color: #8f8f9b; text-align: center; }
@media (max-width: 600px) {
  .sc-jarvis-api-form > div, .sc-jarvis-api-secret { grid-template-columns: 1fr; }
  .sc-jarvis-api-key { align-items: stretch; flex-direction: column; }
}

/* Central de integrações Jarvis — hierarquia técnica, sem glow ou sombras. */
.sc-jarvis-api-container{max-width:860px;width:min(94vw,860px);max-height:min(90dvh,850px);box-shadow:none!important}
.sc-jarvis-api-container .sc-modal-header{padding:24px 26px 20px}
.sc-jarvis-api-body{gap:16px;padding:20px 26px 28px!important}
.sc-jarvis-api-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:22px;padding:20px;border:1px solid #303440;border-radius:14px;background:#11141b}
.sc-jarvis-api-hero h4{margin:8px 0 7px;color:#f5f6f9;font-size:1.2rem}.sc-jarvis-api-hero p{max-width:570px;margin:0;color:#9fa5b2;font-size:.82rem;line-height:1.55}.sc-jarvis-api-status{color:#73d8aa;font-size:.64rem;font-weight:850;letter-spacing:.1em}.sc-jarvis-api-hero>a{min-height:42px;display:inline-flex;align-items:center;gap:8px;padding:0 14px;border:1px solid #4b5262;border-radius:10px;color:#f2f3f6;font-size:.76rem;font-weight:750;white-space:nowrap}
.sc-jarvis-api-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:9px}.sc-jarvis-api-stats article{display:grid;gap:6px;padding:14px 15px;border:1px solid #2c303b;border-radius:11px;background:#0d0f15}.sc-jarvis-api-stats span{color:#858c9a;font-size:.68rem}.sc-jarvis-api-stats strong{color:#f5f6f8;font-size:.95rem}
.sc-jarvis-api-quickstart{display:grid;gap:7px}.sc-jarvis-api-quickstart>div{min-width:0;display:grid;grid-template-columns:66px minmax(0,1fr) 34px;align-items:center;gap:10px;min-height:48px;padding:6px 7px 6px 13px;border:1px solid #2d313c;border-radius:10px;background:#0b0d12}.sc-jarvis-api-quickstart span{color:#8d93a0;font-size:.6rem;font-weight:850;letter-spacing:.09em}.sc-jarvis-api-quickstart code{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c9c1f8;font-size:.72rem}.sc-jarvis-api-quickstart button{width:34px;height:34px;border:1px solid #303541;border-radius:8px;background:#151821;color:#b9bfca;cursor:pointer}
.sc-jarvis-api-security{display:flex;align-items:flex-start;gap:11px;padding:13px 15px;border:1px solid #54482e;border-radius:10px;background:#17140d}.sc-jarvis-api-security i{margin-top:2px;color:#e7bb58}.sc-jarvis-api-security p{margin:0;color:#b9b2a4;font-size:.74rem;line-height:1.45}.sc-jarvis-api-security strong{color:#f0e5cc}
.sc-jarvis-api-form{padding:17px;border:1px solid #303440;border-radius:13px;background:#101219}.sc-jarvis-api-form-heading{display:flex!important;grid-template-columns:none!important;align-items:center;justify-content:space-between;margin-bottom:6px}.sc-jarvis-api-form-heading>div{display:grid;gap:3px}.sc-jarvis-api-form-heading strong{font-size:.84rem}.sc-jarvis-api-form-heading small{color:#888f9c;font-size:.67rem}.sc-jarvis-api-form-heading>span{padding:5px 8px;border:1px solid #343945;border-radius:999px;color:#8d94a2;font-size:.6rem}.sc-jarvis-api-form>div:last-child{grid-template-columns:minmax(0,1fr) auto}.sc-jarvis-api-form input{min-width:0}
.sc-jarvis-api-refresh-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; background: #191c24; border: 1px solid #333845; border-radius: 9px; color: #e2e8f0; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease; }
.sc-jarvis-api-refresh-btn:hover { background: #232733; border-color: #5c657a; color: #ffffff; }
.sc-jarvis-api-keys-section{display:grid;gap:10px;padding-top:3px}.sc-jarvis-api-keys-section>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.sc-jarvis-api-keys-section>header strong{display:block;font-size:.83rem}.sc-jarvis-api-keys-section>header small{color:#858b98;font-size:.67rem}.sc-jarvis-api-key{min-height:70px;padding:13px 14px}.sc-jarvis-api-key-meta{display:flex;flex-wrap:wrap;gap:5px 12px;color:#7f8694;font-size:.62rem}.sc-jarvis-api-key-meta span{display:inline-flex;align-items:center;gap:5px}.sc-jarvis-api-key code{font-size:.72rem}.sc-jarvis-api-key button{min-width:82px}
@media(max-width:650px){.sc-jarvis-api-container{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.sc-jarvis-api-container .sc-modal-header,.sc-jarvis-api-body{padding-left:16px!important;padding-right:16px!important}.sc-jarvis-api-hero{grid-template-columns:1fr}.sc-jarvis-api-hero>a{justify-content:center}.sc-jarvis-api-stats{grid-template-columns:1fr 1fr}.sc-jarvis-api-stats article:last-child{grid-column:1/-1}.sc-jarvis-api-quickstart>div{grid-template-columns:56px minmax(0,1fr) 34px}.sc-jarvis-api-form>div:last-child{grid-template-columns:1fr}.sc-jarvis-api-form button{width:100%;justify-content:center}.sc-jarvis-api-key{align-items:stretch;flex-direction:column}.sc-jarvis-api-key button{width:100%}}

