@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    --text-black: #000000;
    --surface-card: #ffffff;
    --surface-soft: #f8fafc;
    --border-subtle: rgba(148, 163, 184, 0.35);
    --shadow-soft: 0 10px 28px -6px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 16px 34px -6px rgba(15, 23, 42, 0.1), 0 6px 16px -3px rgba(15, 23, 42, 0.06);
    --radius-lg: 18px;
    --radius-md: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #f1f5f9;
    background-image:
        radial-gradient(at 0% 0%, rgba(186, 230, 253, 0.45) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(219, 234, 254, 0.5) 0px, transparent 50%),
        linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
    background-attachment: fixed;
    font-family: var(--font-sans);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    color: var(--text-black) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==========================================================================
   TIPOGRAFIA RECOMENDÁVEL E HIERARQUIA VISUAL (SEMPRE EM PRETO #000000)
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand span,
.card-title,
.card-header {
    font-family: var(--font-heading);
    color: var(--text-black) !important;
    letter-spacing: -0.022em;
    line-height: 1.3;
}

p, span, div, small, label, li, td, th, a {
    color: var(--text-black);
}

/* Fontes Monoespaçadas e Números Tabulares para Métricas e Hashes */
#humanScore, #aiScore, #similarityScore, #formattingScore,
#examPercentBadge, #perplexityBadge, #burstinessBadge,
#evidenceIdBadge, code {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Tipografia Editorial Serifada para Tema Central e Excertos Académicos */
#mainThemeText {
    font-family: var(--font-serif);
    font-size: clamp(1.02rem, 1.5vw, 1.15rem) !important;
    line-height: 1.55;
    color: var(--text-black) !important;
}

/* ==========================================================================
   CABEÇALHOS E NAVBAR MODERNA E RESPONSIVA
   ========================================================================== */
.bg-header-light {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.94) 0%, rgba(224, 242, 254, 0.96) 55%, rgba(186, 230, 253, 0.94) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid rgba(147, 197, 253, 0.6) !important;
    color: var(--text-black) !important;
}

.navbar-compact {
    min-height: 52px;
    padding-top: 0.32rem !important;
    padding-bottom: 0.32rem !important;
}

.brand-title-compact {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.5vw, 1.08rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    color: var(--text-black) !important;
}

.brand-subtitle-compact {
    font-size: 0.7rem !important;
    line-height: 1.15 !important;
    color: var(--text-black) !important;
    opacity: 0.9;
}

.nav-link-compact {
    font-family: var(--font-heading);
    font-size: 0.83rem !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    border-radius: 7px;
    transition: background-color 0.18s ease;
    color: var(--text-black) !important;
}

.nav-link-compact:hover {
    background-color: rgba(255, 255, 255, 0.65);
    color: var(--text-black) !important;
}

.btn-header-analisar {
    padding: 0.28rem 0.85rem !important;
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
    border-width: 1.5px !important;
    white-space: nowrap;
}

.navbar-brand img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    object-fit: contain;
}

.navbar-brand:hover img {
    transform: scale(1.04);
}

.navbar-brand .h4,
.navbar-brand .h5 {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    font-weight: 800 !important;
}

.bg-authors-header-light {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 60%, #ede9fe 100%);
    color: var(--text-black) !important;
    border-bottom: 1px solid #bfdbfe !important;
}

/* ==========================================================================
   BOTÕES E CONTROLES DE FORMULÁRIO PREMIUM (LETRAS PRETAS)
   ========================================================================== */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 11px;
}

.btn-analyze-black {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 100%);
    border: 2px solid #0284c7;
    color: var(--text-black) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-analyze-black:hover, .btn-analyze-black:focus {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-color: #0369a1;
    color: var(--text-black) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-analyze-black:active {
    transform: translateY(0);
}

.btn-pdf-black {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
    border: 2px solid #dc2626;
    color: var(--text-black) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-pdf-black:hover, .btn-pdf-black:focus {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: var(--text-black) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.24);
}

.btn-outline-dark {
    border: 2px solid #334155;
    color: var(--text-black) !important;
    background-color: #ffffff;
}

.btn-outline-dark:hover, .btn-outline-dark:focus {
    background-color: #e2e8f0;
    border-color: #0f172a;
    color: var(--text-black) !important;
    transform: translateY(-1px);
}

/* Inputs e Selects Aprimorados */
.form-control, .form-select {
    font-family: var(--font-sans);
    color: var(--text-black) !important;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 11px;
    padding: 0.62rem 0.95rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control-lg, .form-select-lg {
    padding: 0.72rem 1.05rem;
    font-size: 0.98rem;
    border-radius: 12px;
}

.form-control:focus, .form-select:focus {
    color: var(--text-black) !important;
    background-color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
    color: #475569 !important;
    opacity: 0.85;
}

.form-label {
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
    font-size: 0.76rem !important;
    color: var(--text-black) !important;
}

/* Filtro de Base de Dados no Painel Direito */
.btn-db-filter {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid #93c5fd;
    color: var(--text-black) !important;
    font-size: 0.78rem;
    padding: 0.48rem 0.65rem;
    border-radius: 8px;
}

.btn-db-filter.active, .btn-db-filter:hover {
    background-color: #60a5fa !important;
    border-color: #1d4ed8 !important;
    color: var(--text-black) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   CARTÕES E PAINÉIS DE SUPERFÍCIE
   ========================================================================== */
.card {
    border-radius: var(--radius-lg);
    color: var(--text-black);
    background-color: var(--surface-card);
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-subtle) !important;
    transition: box-shadow 0.25s ease;
}

.card-header {
    border-top-left-radius: calc(var(--radius-lg) - 1px) !important;
    border-top-right-radius: calc(var(--radius-lg) - 1px) !important;
    font-size: 0.98rem;
}

.upload-card {
    border-top: 5px solid #2563eb !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.report-header-card {
    border-left: 6px solid #2563eb !important;
    background: linear-gradient(90deg, #f8fbff 0%, #ffffff 100%);
}

.badge {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-black) !important;
}

/* Barras de Composição com Letras Pretas */
.bar-human-light {
    background: linear-gradient(90deg, #6ee7b7 0%, #34d399 100%) !important;
    color: var(--text-black) !important;
    border-right: 1px solid #059669;
}

.bar-assisted-light {
    background: linear-gradient(90deg, #fef08a 0%, #fde047 100%) !important;
    color: var(--text-black) !important;
    border-right: 1px solid #ca8a04;
}

.bar-ai-light {
    background: linear-gradient(90deg, #fca5a5 0%, #f87171 100%) !important;
    color: var(--text-black) !important;
}

/* ==========================================================================
   PROGRESSBAR CIRCULAR LINDO E BONITO (COM LETRAS PRETAS)
   ========================================================================== */
.circular-exam-card {
    background: radial-gradient(circle at top left, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid #bfdbfe !important;
}

.circular-progress-wrapper {
    position: relative;
    width: 235px;
    height: 235px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbital-ring {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 2px dashed rgba(37, 99, 235, 0.45);
    animation: spin-orbital 10s linear infinite;
    pointer-events: none;
}

.orbital-ring.ring-complete {
    border: 2px solid rgba(22, 163, 74, 0.55);
    animation: none;
}

@keyframes spin-orbital {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.circular-svg {
    width: 220px;
    height: 220px;
    transform: rotate(-90deg);
    overflow: visible;
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 14;
}

.circle-progress {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-center-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.circle-icon-box {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-black);
}

.circle-percent-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-black) !important;
    letter-spacing: -1.5px;
}

.circle-status-tag {
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--text-black) !important;
}

/* ==========================================================================
   ETAPAS DE EXAME E INDICADORES
   ========================================================================== */
.scanner-pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #2563eb;
    box-shadow: 0 0 0 rgba(37, 99, 235, 0.6);
    animation: pulse-blue 1.4s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.exam-progress-wrapper {
    border-radius: 10px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.exam-step-item {
    background-color: #ffffff;
    border-color: #cbd5e1 !important;
    color: var(--text-black) !important;
    transition: all 0.25s ease;
}

.exam-step-item.step-active {
    background-color: #dbeafe;
    border-color: #3b82f6 !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.exam-step-item.step-done {
    background-color: #dcfce7;
    border-color: #4ade80 !important;
}

/* ==========================================================================
   CARTÕES DE MÉTRICAS E MATRIZ DE PALAVRAS NA IDEIA
   ========================================================================== */
.metric-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    color: var(--text-black);
    border: 1px solid var(--border-subtle) !important;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover) !important;
}

.metric-card h2 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.metric-border-human { border-bottom: 5px solid #10b981 !important; background: linear-gradient(180deg, #ffffff 0%, #f2fdf8 100%) !important; }
.metric-border-ai { border-bottom: 5px solid #ef4444 !important; background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%) !important; }
.metric-border-sim { border-bottom: 5px solid #3b82f6 !important; background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%) !important; }
.metric-border-fmt { border-bottom: 5px solid #06b6d4 !important; background: linear-gradient(180deg, #ffffff 0%, #f2fcfe 100%) !important; }

.word-matrix-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 10px;
    color: var(--text-black);
    transition: background-color 0.2s ease;
}

.word-matrix-item:hover {
    background-color: #f1f5f9;
}

/* ==========================================================================
   PAINEL DIREITO DE AUTORES E CORES DIFERENTES POR REFERÊNCIA
   ========================================================================== */
.authors-right-panel {
    overflow: hidden;
    border: 1px solid #bfdbfe !important;
}

.authors-scroll-container {
    max-height: 980px;
    overflow-y: auto;
    padding-right: 4px;
}

.authors-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.authors-scroll-container::-webkit-scrollbar-thumb {
    background-color: #94a3b8;
    border-radius: 8px;
}

.author-match-card {
    background-color: #ffffff;
    border-radius: 14px;
    color: var(--text-black) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.author-match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09) !important;
}

/* 6 Cores Diferentes para Marcar as Referências e Autores */
.ref-theme-0 { border-left: 6px solid #2563eb !important; background-color: #f8fbff; }
.ref-theme-0 .ref-highlight-box { background-color: #dbeafe; border: 1px solid #93c5fd; color: #000000; }
.ref-theme-0 .ref-color-badge { background-color: #93c5fd !important; color: #000000 !important; border: 1px solid #2563eb; }

.ref-theme-1 { border-left: 6px solid #059669 !important; background-color: #f6fef9; }
.ref-theme-1 .ref-highlight-box { background-color: #d1fae5; border: 1px solid #6ee7b7; color: #000000; }
.ref-theme-1 .ref-color-badge { background-color: #6ee7b7 !important; color: #000000 !important; border: 1px solid #059669; }

.ref-theme-2 { border-left: 6px solid #d97706 !important; background-color: #fffdf5; }
.ref-theme-2 .ref-highlight-box { background-color: #fef3c7; border: 1px solid #fcd34d; color: #000000; }
.ref-theme-2 .ref-color-badge { background-color: #fcd34d !important; color: #000000 !important; border: 1px solid #d97706; }

.ref-theme-3 { border-left: 6px solid #7c3aed !important; background-color: #fbfaff; }
.ref-theme-3 .ref-highlight-box { background-color: #ede9fe; border: 1px solid #c4b5fd; color: #000000; }
.ref-theme-3 .ref-color-badge { background-color: #c4b5fd !important; color: #000000 !important; border: 1px solid #7c3aed; }

.ref-theme-4 { border-left: 6px solid #e11d48 !important; background-color: #fff9fa; }
.ref-theme-4 .ref-highlight-box { background-color: #ffe4e6; border: 1px solid #fda4af; color: #000000; }
.ref-theme-4 .ref-color-badge { background-color: #fda4af !important; color: #000000 !important; border: 1px solid #e11d48; }

.ref-theme-5 { border-left: 6px solid #0891b2 !important; background-color: #f6feff; }
.ref-theme-5 .ref-highlight-box { background-color: #cffafe; border: 1px solid #67e8f9; color: #000000; }
.ref-theme-5 .ref-color-badge { background-color: #67e8f9 !important; color: #000000 !important; border: 1px solid #0891b2; }

.idea-box-doc {
    font-family: var(--font-serif);
    background-color: #fef9c3;
    border-left: 3.5px solid #ca8a04;
    color: var(--text-black);
    line-height: 1.5;
}

.idea-box-author {
    font-family: var(--font-serif);
    background-color: #e0f2fe;
    border-left: 3.5px solid #0284c7;
    color: var(--text-black);
    line-height: 1.5;
}

.progress {
    border-radius: 14px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.progress-bar {
    font-family: var(--font-mono);
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-black) !important;
}

#textPreview {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    background-color: #f8fafc;
    color: var(--text-black) !important;
    line-height: 1.65;
    font-size: 0.84rem;
    border: 1px solid #cbd5e1 !important;
}

/* Tabelas Modernas e Responsivas */
.table {
    color: var(--text-black) !important;
    vertical-align: middle;
}

.table thead th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-black) !important;
    white-space: nowrap;
}

.table-responsive {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

/* Rodapé Sempre Alinhado no Fundo */
footer {
    margin-top: auto !important;
    font-family: var(--font-sans);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.03);
}

/* Abas de Administração e Botões de Período Rápido */
#adminTabs .nav-link {
    font-family: var(--font-heading);
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text-black) !important;
}

.quick-range-btn {
    border-radius: 20px !important;
    padding: 0.28rem 0.75rem !important;
    font-size: 0.78rem !important;
}

/* ==========================================================================
   DESIGN TOTALMENTE RESPONSIVO (TABLETS, TELEMÓVEIS E ECRÃS PEQUENOS)
   ========================================================================== */

/* Desktops Médios e Tablets em Paisagem (< 992px) */
@media (max-width: 991.98px) {
    .authors-right-panel.sticky-lg-top {
        position: static !important;
    }

    .authors-scroll-container {
        max-height: 680px;
    }

    .navbar .container-xxl {
        gap: 0.75rem;
    }
}

/* Tablets em Retrato e Telemóveis Grandes (< 768px) */
@media (max-width: 767.98px) {
    .navbar {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .navbar .container-xxl {
        flex-direction: column;
        align-items: stretch !important;
        text-align: center;
    }

    .navbar-brand {
        justify-content: center;
        white-space: normal;
        text-align: left;
    }

    .navbar .d-flex.align-items-center.gap-2 {
        justify-content: center;
        width: 100%;
    }

    .navbar .d-flex.align-items-center.gap-2 .btn {
        width: 100%;
    }

    #adminTabs {
        flex-direction: column;
    }

    #adminTabs .nav-item,
    #adminTabs .nav-link {
        width: 100%;
        text-align: left;
    }

    .card-body {
        padding: 1.15rem !important;
    }

    #licenseStatusBanner {
        width: 100%;
        justify-content: flex-start;
    }

    #licenseStatusBanner .badge {
        font-size: 0.74rem;
        padding: 0.4rem 0.65rem !important;
    }

    .report-header-card .card-body {
        flex-direction: column;
        align-items: stretch !important;
    }

    .report-header-card .d-flex.gap-2 {
        width: 100%;
        flex-direction: column;
    }

    .report-header-card .d-flex.gap-2 .btn {
        width: 100%;
    }

    .exam-step-item {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .exam-step-item .step-status {
        margin-left: auto;
    }
}

/* Telemóveis (< 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 0.93rem;
    }

    .navbar-brand img {
        width: 40px !important;
        height: 40px !important;
        margin-right: 0.65rem !important;
    }

    .navbar-brand small {
        font-size: 0.74rem !important;
        line-height: 1.3;
    }

    .circular-progress-wrapper {
        width: 195px;
        height: 195px;
    }

    .circular-svg {
        width: 182px;
        height: 182px;
    }

    .circle-percent-value {
        font-size: 2.05rem;
    }

    /* Botões de filtro de base de dados empilhados ou flexíveis em ecrãs estreitos */
    .authors-right-panel .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .authors-right-panel .btn-group > .btn {
        border-radius: 8px !important;
        width: 100%;
        margin-left: 0 !important;
    }

    .metric-card {
        padding: 0.85rem !important;
    }

    .metric-card h2 {
        font-size: 1.45rem;
    }

    .metric-card .small {
        font-size: 0.72rem;
    }

    .form-control-lg, .form-select-lg, .btn-lg {
        font-size: 0.92rem;
        padding: 0.65rem 0.9rem;
    }
}

/* ==========================================================================
   Botões Compactos e Refinados (Aprovar, WhatsApp, Fatura, Ações Rápidas)
   ========================================================================== */
.btn-xs {
    padding: 0.24rem 0.58rem !important;
    font-size: 0.74rem !important;
    line-height: 1.25 !important;
    border-radius: 6px !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.28rem !important;
    white-space: nowrap !important;
    transition: all 0.18s ease !important;
}

.btn-approve-xs {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%) !important;
    border: 1.5px solid #ca8a04 !important;
    color: #000000 !important;
    box-shadow: 0 2px 5px rgba(234, 179, 8, 0.22) !important;
}

.btn-approve-xs:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(234, 179, 8, 0.32) !important;
    color: #000000 !important;
}

.btn-wa-xs {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    border: 1.5px solid #16a34a !important;
    color: #000000 !important;
    box-shadow: 0 2px 5px rgba(22, 163, 74, 0.16) !important;
}

.btn-wa-xs:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.26) !important;
    color: #000000 !important;
}

.btn-invoice-xs {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    border: 1.5px solid #0284c7 !important;
    color: #000000 !important;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.18) !important;
}

.btn-invoice-xs:hover {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.28) !important;
    color: #000000 !important;
}

/* ==========================================================================
   Trechos Detetados como Plágio / Similaridade: Sublinhados com Link Original
   ========================================================================== */
.plagiarized-underline-link {
    color: #000000 !important;
    text-decoration: underline !important;
    text-decoration-color: #dc2626 !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    background-color: rgba(254, 226, 226, 0.72);
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.plagiarized-underline-link:hover,
.plagiarized-underline-link:focus {
    background-color: #fecaca !important;
    color: #000000 !important;
    text-decoration: underline !important;
    text-decoration-color: #b91c1c !important;
    text-decoration-thickness: 2.5px !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.plagiarized-ref-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-family: var(--font-heading);
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    font-style: normal !important;
    text-decoration: none !important;
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #000000 !important;
    padding: 0.1rem 0.42rem;
    border-radius: 5px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.plagiarized-ref-tag:hover {
    background-color: #fca5a5;
    color: #000000 !important;
}
