/* 
   Blueprint Rule 6: Code Style: Pure Bootstrap 5.3. 
   Evitar CSS customizado e style inline, priorizar injeção de Variáveis CSS.
*/

/* Reset e Fonte Padrão */
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Injeção Dinâmica das Variáveis de Identidade Visual no Bootstrap 5.3 */
/* O HTML recebe as variáveis como --brand-primary dinamicamente via backend */

[data-bs-theme="light"] {
    /* Mapping Brand Configs to Bootstrap Contextual Colors */
    --bs-primary: var(--brand-primary, #4f46e5);
    --bs-secondary: var(--brand-secondary, #f1f5f9);

    /* Light Theme Surface Tweaks */
    --bs-body-bg: #f8fafc;
    --bs-body-tertiary-bg: #ffffff;
    --bs-border-color: #e2e8f0;

    /* Glass Tokens */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] {
    /* Mapping Brand Configs to Bootstrap Contextual Colors */
    --bs-primary: var(--brand-primary, #6366f1);
    --bs-secondary: var(--brand-secondary, #1e293b);

    /* Dark Theme Surface Tweaks */
    --bs-body-bg: #0f1115;
    --bs-body-tertiary-bg: #161920;
    --bs-border-color: #2d313a;

    /* Glass Tokens */
    --glass-bg: rgba(22, 25, 32, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Utilitários Extras Mínimos (Quando o Bootstrap 5.3 não atende 100%) */

/* Beautiful Scrollbars - Hidden by default, visible on hover (Gemini-style) */
.overflow-auto {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.overflow-auto:hover {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.overflow-auto::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.overflow-auto:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.overflow-auto:hover::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.35);
}

/* Dark theme overrides for scrollbar */
[data-bs-theme="dark"] .overflow-auto:hover {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-bs-theme="dark"] .overflow-auto:hover::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .overflow-auto:hover::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Sidebar Collapse Transition */
#sidebarMenu {
    width: var(--sidebar-width, 280px);
    transition: width 0.3s ease, margin 0.3s ease;
    overflow-x: hidden;
    position: relative;
}

/* Sidebar Nav - Destaque do ícone quando ativo */
.nav-link.active .bi {
    color: #fff !important;
}

#sidebarMenu.sidebar-collapsed {
    width: 0 !important;
    overflow: hidden;
    margin-left: 0 !important;
    border: none !important;
    padding: 0 !important;
}

#sidebarMenu.sidebar-collapsed * {
    visibility: hidden;
}

/* Focus Ring Customization */
.focus-ring-container:focus-within {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb, 99, 102, 241), .25) !important;
}

/* Fix Text Wrap and Layout Issues */
.streaming-content {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: break-word;
}

.streaming-content * {
    word-break: break-word;
}

/* Resize Grip for Sidebar */
#sidebarResizer {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s ease;
    z-index: 1051;
}

#sidebarResizer:hover {
    background: var(--bs-primary);
    opacity: 0.3;
}

/* Decorating Code Blocks with Copy Button */
pre.prompt-payload-box {
    position: relative;
    padding-right: 80px !important;
    /* Space for the copy button */
    max-width: 100%;
    border: 1px solid var(--bs-border-color);
    border-left: 4px solid var(--bs-primary);
    border-radius: 8px;
    background-color: var(--bs-secondary-bg);
    padding: 1rem;
    font-family: monospace;
    margin-top: 1rem;
}

code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10;
}

.copy-btn:hover {
    opacity: 1;
}

/* Ensure main content never pushes sidebar out */
main {
    min-width: 0;
    flex: 1 1 0;
}

/* ==========================================
   AESTHETIC UPGRADES (v1.2.4)
   ========================================== */

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper do Google com Camadas (Overlay Hack) */
.google-auth-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 280px;
    height: 44px;
    margin: 0 auto;
}

/* Camada Visual (O que o designer vê) */
.google-custom-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1f23;
    /* Graphite */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    font-family: inherit;
    font-size: 0.9rem;
    pointer-events: none;
    /* Deixa o clique passar para a camada real */
}

.google-auth-wrapper:hover .google-custom-btn {
    background: #25262b;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Camada Real (Invisível mas funcional) */
.google-real-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    /* Praticamente invisível */
    z-index: 2;
    overflow: hidden;
    cursor: pointer;
}

.google-real-btn iframe {
    width: 100% !important;
    height: 100% !important;
    transform: scale(1.5);
    cursor: pointer !important;
}

#loginOverlay {
    background: radial-gradient(circle at center, rgba(15, 17, 21, 0.85), rgba(0, 0, 0, 0.98)) !important;
}

.card {
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}


/* ==========================================
   PRECISION UI (CLEAN CODE ENFORCED v1.3.0)
   ========================================== */

/* Max Widths for Precision Layout */
.mw-800 {
    max-width: 800px;
}

.mw-700 {
    max-width: 700px;
}

/* Fixed Widths for Admin Tables */
.w-150px {
    width: 150px;
}

.w-250px {
    width: 250px;
}

/* Progress Bar Heights */
.h-4px {
    height: 4px;
}

.h-6px {
    height: 6px;
}

/* Chat Customizations */
.chat-bubble-max {
    max-width: 85%;
}

.chat-input-precision {
    min-height: 44px;
    resize: none;
    overflow-y: auto !important; /* Allow scrolling when max-height is reached */
}

/* Modal & Layout Helpers */
.modal-precision-content {
    width: 90%;
}

.vh-85 {
    height: 85vh;
}

.w-40 {
    width: 40%;
}

.w-90 {
    width: 90%;
}


/* ==========================================
   PRECISION HELPERS (RESTORED & OPTIMIZED)
   ========================================== */

/* Square Containers and Buttons */
.square-btn-32 {
    width: 32px;
    height: 32px;
}

.square-btn-40 {
    width: 40px;
    height: 40px;
}

.square-box-48 {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.square-box-64 {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Indicator Dots */
.dot-8 {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}

.dot-12 {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Branding & Avatars */
.sidebar-logo-img {
    height: 45px;
    width: auto;
}

.welcome-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 2rem;
}

.brand-logo-auth {
    height: 48px;
    width: auto;
}

.user-avatar-box {
    width: 40px;
    height: 40px;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Chat specific tweaks */
.tracking-wider {
    letter-spacing: 0.05em;
}

/* Sub-navegação Sidebar */
.nav-sub-item {
    font-size: 0.8rem !important;
    padding-left: 2.8rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    opacity: 0.7;
    font-weight: 400 !important;
}

.nav-sub-item:hover {
    opacity: 1;
}

.nav-sub-item i {
    font-size: 0.9rem !important;
    margin-right: 0.5rem !important;
}

/* Layout State Helpers */
.cursor-pointer {
    cursor: pointer;
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Sidebar Resizer */
.sidebar-resizing {
    user-select: none;
    cursor: col-resize;
}

/* ==========================================
   UI TWEAKS (MIGRATED FROM INDEX.HTML)
   ========================================== */

.nav-link.text-truncate {
    font-size: 0.85rem !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.module-link i {
    opacity: 0.8;
}

.nav-item .nav-link:hover {
    background: rgba(var(--bs-primary-rgb), 0.05);
}

/* ==========================================
   MARKDOWN & CHAT v1.7.0 (GEMINI ELITE)
   ========================================== */

/* v1.9.5: Chat Image Styling */
.chat-message img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.chat-preview-img {
    max-width: 280px !important;
    height: auto;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 15px auto;
}

/* v1.9.6.2: Code & Instructions Styling */
.chat-message code {
    color: #a5d6ff;
    /* Azul claro legível */
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

.chat-message-system code {
    color: #f0f6fc;
    /* Quase branco para o card azul */
    background: rgba(255, 255, 255, 0.1);
}

/* v1.9.6.6: Solarized Edit Mode Theme (Clean CSS, No !important) */
.chat-bubble.chat-message-system-edit {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chat-bubble.chat-message-system-edit .chat-preview-img {
    border-color: #eee8d5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-bubble.chat-message-system-edit code {
    color: #cb4b16;
    /* Laranja Solarized */
    background: rgba(0, 0, 0, 0.05);
    font-weight: bold;
}

.chat-bubble.chat-message-system-edit hr {
    border-color: rgba(0, 0, 0, 0.1);
}

.post-metadata-compact {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.chat-bubble.chat-message-system-edit .post-metadata-compact {
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    color: #586e75;
    /* Cinza Solarized */
}

/* Cursor de Digitação Animado */
.chat-cursor-blinker {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--bs-primary);
    margin-left: 4px;
    vertical-align: middle;
    animation: blinker 1s step-start infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Estilização de Conteúdo Rendereizado */
.marked-content h1,
.marked-content h2,
.marked-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

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

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

.marked-content h3 {
    font-size: 1.1rem;
}

.marked-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.marked-content ul,
.marked-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.marked-content li {
    margin-bottom: 0.4rem;
}

.marked-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 0.5rem 1rem;
    background: rgba(var(--bs-primary-rgb), 0.03);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.8;
}

/* Tabelas Premium */
.marked-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.marked-content th {
    background: rgba(var(--bs-primary-rgb), 0.05);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Ações da Bolha */
.bubble-actions {
    transition: opacity 0.2s ease;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* Botão de Cópia em Blocos de Código */
.code-copy-btn {
    z-index: 5;
    transition: all 0.2s ease;
    border-color: rgba(255, 255, 255, 0.1);
}

.code-copy-btn:hover {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary);
    opacity: 1 !important;
}

/* Raw View (Código Fonte) */
.raw-view {
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.02);
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--bs-border-color);
}

/* Histórico Scrollable v1.9.6.7 (Natural Growth & Text Wrap) */
[data-chat-history] {
    max-height: none;
    /* Deixa crescer naturalmente */
    overflow: visible;
    /* Usa o scroll da sidebar pai */
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

[data-chat-history] .nav-item {
    width: 100% !important;
    display: block !important;
}

[data-chat-history] .nav-link {
    width: 100% !important;
    display: flex !important;
    text-align: left !important;
    white-space: normal !important;
    /* Permite quebra de linha */
    align-items: flex-start !important;
    /* Alinha Badge/Ícone ao topo */
    word-break: break-word;
    padding: 0.5rem 0.75rem !important;
}

[data-chat-history] .nav-link span {
    display: inline-block;
    line-height: 1.3;
}

[data-chat-history]::-webkit-scrollbar {
    width: 4px;
}

[data-chat-history]::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 10px;
}

/* Thinking Orb v1.7.7 (Liquid AI Indicator) */
.thinking-orb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
    background-size: 200% 200%;
    animation: liquid-mix 2s ease-in-out infinite, orb-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(var(--bs-primary-rgb), 0.3);
    margin: 5px 0;
}

@keyframes liquid-mix {
    0% {
        background-position: 0% 50%;
        border-radius: 50% 50% 50% 50%;
    }

    50% {
        background-position: 100% 50%;
        border-radius: 40% 60% 40% 60%;
    }

    100% {
        background-position: 0% 50%;
        border-radius: 50% 50% 50% 50%;
    }
}

@keyframes orb-pulse {

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

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

/* Utilitários de Chat v1.7.7 */
.chat-input-wrapper {
    padding-top: 1.5rem !important;
    /* pt-4 equivalent */
}


/* Animações de Feedback v1.9.1 */
@keyframes pulse-custom {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.animate-pulse {
    animation: pulse-custom 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* v1.9.9.5: Redondo UI Additions */
.meta-hide,
.system-signal,
.editor-signal {
    display: none !important;
}

/* v2.2.5: Modo Editor Solarized */
.chat-bubble-editor {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-warning) !important;
    color: var(--bs-body-color) !important;
    box-shadow: inset 0 0 10px rgba(var(--bs-warning-rgb), 0.05) !important;
}

.chat-bubble-editor .meta-badge {
    background: rgba(181, 137, 0, 0.05);
    /* Solarized Yellow tint */
    border-color: rgba(181, 137, 0, 0.1);
}

.chat-bubble-editor .meta-key {
    color: #b58900;
    /* Solarized Yellow */
}

.focus-within-ring:focus-within {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15) !important;
}

.chat-input-precision {
    transition: height 0.2s ease;
    min-height: 24px;
}

/* Garante que o Code View mostre tudo, inclusive o oculto */
.raw-view .meta-hide {
    display: block !important;
    opacity: 0.5;
}

.meta-badge {
    display: flex;
    align-items: center;
    background: rgba(var(--bs-primary-rgb), 0.04);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-body-color);
    padding: 2px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-bottom: 8px;
    width: fit-content;
    font-family: var(--bs-font-sans-serif);
    transition: all 0.2s ease;
}

.meta-badge-title {
    font-size: 0.95rem;
    padding: 6px 14px;
    background: rgba(var(--bs-primary-rgb), 0.02);
    border-color: rgba(var(--bs-primary-rgb), 0.15);
    margin-bottom: 12px;
}

.meta-key {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-primary);
    margin-right: 8px;
    font-size: 0.65rem;
}

.meta-badge-title .meta-key {
    font-size: 0.75rem;
}

.meta-value {
    font-weight: 500;
    opacity: 0.9;
}

.meta-badge:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* v2.5.3: Qsite Designer UI & Capsule Standardization */
.chat-input-wrapper .chat-input-container {
    border-radius: 26px !important; /* Perfect pill shape for single line, looks like rounded-pill */
    padding-left: 1rem;
    padding-right: 0.5rem;
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    transition: all 0.2s ease;
}

.chat-input-wrapper .chat-input-container:focus-within {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1) !important;
}

.italic {
    font-style: italic;
}

.chat-input-area::placeholder {
    opacity: 0.6;
}

/* --- Bio Digital Capsule Preview (v2.9.2) --- */
.bio-capsule-container {
    width: 100%;
    max-width: 360px;
    margin: 1.5rem auto;
    font-family: 'Outfit', sans-serif;
}

.bio-card-preview {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.3s ease;
}

[data-bs-theme="light"] .bio-card-preview {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.bio-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.bio-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bs-body-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.bio-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bio-verified-icon {
    color: #3897f0;
    font-size: 1rem;
}

.bio-subtitle {
    font-size: 0.9rem;
    opacity: 0.65;
    margin-bottom: 2rem;
    font-weight: 400;
}

.bio-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.bio-link-box {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    text-decoration: none !important;
    color: var(--bs-body-color) !important;
    transition: all 0.2s ease;
    gap: 16px;
    width: 100%;
}

[data-bs-theme="dark"] .bio-link-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.bio-link-box:hover {
    transform: translateY(-2px);
    background: var(--bs-secondary-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bio-link-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bio-link-content {
    flex-grow: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bio-link-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 2px;
    color: var(--bs-heading-color);
}

.bio-link-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.2;
}

.bio-link-external {
    opacity: 0.3;
    font-size: 1rem;
    margin-left: auto;
}

/* --- Asset Drawer Premium UI (v3.0.6.20) --- */
#qmindAssetDrawer {
    z-index: 1060;
}

.group:hover .group-hover-opacity-100 {
    opacity: 1 !important;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

.asset-item-card {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.asset-item-card:hover {
    transform: translateY(-4px);
}

.asset-item-thumb {
    aspect-ratio: 1/1;
    border-radius: 12px;
    object-fit: cover;
    background-color: var(--bs-body-tertiary-bg);
}

.asset-item-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.asset-item-card:hover .asset-item-actions {
    opacity: 1;
}

.asset-item-name {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
    text-align: center;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    line-height: 1.2;
}

.btn-white {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

.square-btn-32 {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.square-btn-34 {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.square-btn-36 {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.square-btn-40 {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.hover-shadow-sm:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* --- Maestro v3.0.6.21: UI Effects --- */
.glassmorphism {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .glassmorphism {
    background: rgba(33, 37, 41, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- v3.0.6.45: Bio Digital Premium Preview (Horizontal Layout) --- */
/* Removed legacy bio-premium CSS styles */
/* Gallery Masonry */
.gallery-masonry {
    column-count: 1;
    column-gap: 1.5rem;
}
@media (min-width: 576px) {
    .gallery-masonry { column-count: 2; }
}
@media (min-width: 768px) {
    .gallery-masonry { column-count: 4; }
}
@media (min-width: 1200px) {
    .gallery-masonry { column-count: 5; }
}
@media (min-width: 1600px) {
    .gallery-masonry { column-count: 6; }
}
.gallery-masonry > div {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* Horizontal Gallery Tag Rows (Netflix-style) */
.gallery-tag-section {
    background: var(--bs-body-bg);
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color-translucent);
}

.gallery-tag-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
    letter-spacing: -0.01em;
}

.gallery-tag-name:hover {
    text-decoration: underline;
    color: var(--bs-primary) !important;
}

.gallery-tag-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.25rem;
    padding: 0.5rem 0.25rem 1.25rem 0.25rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Discretionary custom scrollbars */
.gallery-tag-row::-webkit-scrollbar {
    height: 6px;
}
.gallery-tag-row::-webkit-scrollbar-track {
    background: transparent;
}
.gallery-tag-row::-webkit-scrollbar-thumb {
    background-color: var(--bs-border-color);
    border-radius: 10px;
}
.gallery-tag-row::-webkit-scrollbar-thumb:hover {
    background-color: var(--bs-secondary-color);
}

/* Horizontal Cards */
.gallery-tag-row > div {
    flex: 0 0 230px;
    max-width: 230px;
}

.gallery-tag-row .card {
    height: 360px !important;
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.0375) !important;
}

.gallery-tag-row .card-body {
    padding: 0.75rem !important;
    display: flex;
    flex-column: column;
    justify-content: space-between;
}

.gallery-tag-row .card-body h6 {
    font-size: 0.825rem !important;
    margin-bottom: 0.25rem !important;
}

.gallery-tag-row .card-body .text-xs {
    font-size: 0.7rem !important;
    margin-bottom: 0.25rem !important;
}

.gallery-tag-row .card-body p.text-wrap {
    font-size: 0.725rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
    min-height: 2.5em !important;
    -webkit-line-clamp: 2 !important;
}

