/* ==================================
   GERAL
================================== */

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    background: var(--bg);

    color: var(--text);

    font-family: Arial, Helvetica, sans-serif;

    transition:
        background .25s ease,
        color .25s ease;
}

:root {
    --logo-column: 180px;
    --page-padding: 30px;

    /* Marca Soluções */
    --primary: #003893;
    --primary-light: #005EB8;

    /* Light Theme */
    --bg: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-card: #FFFFFF;

    --text: #1F2937;
    --text-muted: #6B7280;

    --border: #E5E7EB;

    --input-bg: #FFFFFF;
    --input-border: #D1D5DB;

    --link: #005EB8;

    --footer-bg: #003893;
    --footer-text: rgba(255,255,255,.85);
}

[data-theme="dark"] {

    --bg: #081529;
    --bg-secondary: #0F1F3A;
    --bg-card: #13284B;

    --text: #F8FAFC;
    --text-muted: #B8C4D6;

    --border: #1F3763;

    --input-bg: #13284B;
    --input-border: #34558D;

    --link: #7FC4FF;

    --footer-bg: #021E4E;
    --footer-text: rgba(255,255,255,.85);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================================
   LOGIN
================================== */

.login-container {

    width: 760px;

    max-width: 95vw;

    min-height: 100vh;

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;
}

.login-container .home-logo {

    white-space: nowrap;

    margin-bottom: 12px;
}

.login-container form {

    width: 500px;

    max-width: 100%;

    margin-top: 25px;
}

.login-container input {

    width: 100%;

    padding: 16px 20px;

    margin-top: 15px;

    border: 1px solid var(--input-border);

    border-radius: 30px;

    background: var(--input-bg);

    color: var(--text);

    font-size: 16px;

    transition: .2s;
}

.login-container input:focus {

    border-color: var(--primary-light);

    outline: none;

    box-shadow: 0 0 0 3px rgba(0,94,184,.15);
}

.login-container button {

    width: 100%;

    margin-top: 20px;

    padding: 16px;

    border: none;

    border-radius: 30px;

    background: var(--primary);

    color: white;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s;
}

.login-container button:hover {

    background: var(--primary-light);
}

/* ==================================
   HEADER
================================== */

.top-search {
    position: sticky;
    top: 0;

    background: var(--bg);

    border-bottom: 1px solid var(--border);

    z-index: 999;
}

/*
    Mesma estrutura para:
    - Logo
    - Busca
    - Espaço livre
*/
.top-search-inner,
.top-search-filtros {
    max-width: 1400px;
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        var(--logo-column)
        minmax(720px, 900px)
        1fr;

    align-items: center;

    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}

.top-search-inner {
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo-mini {
    color: var(--primary-light);
    font-size: 24px;
    font-weight: 700;
    white-space: nowrap;

    justify-self: start;

}

.logo-mini span {
    color: var(--text);
}

/* ==================================
   BUSCA
================================== */

.search-form {
    position: relative;
    width: 100%;
}

.search-form input {

    width: 100%;

    background: var(--input-bg);

    color: var(--text);

    border: 1px solid var(--input-border);

    border-radius: 30px;

    padding: 14px 50px 14px 20px;

    font-size: 16px;

    outline: none;
}

.search-form input:focus {

    border-color: var(--primary-light);

    box-shadow:
        0 0 0 3px rgba(0,94,184,.15);
}

.search-form button {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);

    background: transparent;
    border: none;

    color: var(--primary-light);
    cursor: pointer;
    font-size: 16px;
}

/* ==================================
   FILTROS
================================== */

.top-search-filtros {
    padding-bottom: 10px;
}

.filtros-links {
    display: flex;
    justify-self: start;
    gap: 28px;
}

.top-search-filtros a {
    color: var(--text-muted);
    font-size: 14px;

    padding-bottom: 10px;

    transition: .2s;
}

.top-search-filtros a:hover {
    color: var(--text);
}

.top-search-filtros a.ativo {
    color: var(--primary-light);
    border-bottom: 3px solid var(--primary-light);
}

.filtros-wrapper {
    border-top: 1px solid transparent;
}

/* ==================================
   LAYOUT DOS RESULTADOS
================================== */

.page-content {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        var(--logo-column)
        minmax(720px, 900px)
        1fr;

    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}

/* ==================================
   RESULTADOS
================================== */

.container {

    width: 100%;

    padding-top: 30px;

    padding-bottom: 120px;
}

.resultado-info {

    color: #9aa0a6;

    font-size: 14px;

    margin-bottom: 20px;
}

.resultado {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.titulo-arquivo {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
}

.titulo-arquivo a {
    color: var(--link);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.titulo-arquivo a:hover {
    text-decoration: underline;
}

.caminho {
    margin-top: 6px;
    color: #34a853;
    font-size: 14px;
    word-break: break-all;
}

.meta {
    margin-top: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;

    color: var(--text-muted);
    font-size: 12px;
}

.snippet {
    margin-top: 10px;

    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;

    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.acoes {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.botao {

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 14px;

    border-radius: 20px;

    background: var(--bg-card);

    border: 1px solid var(--border);

    color: var(--primary-light);

    font-size: 13px;

    transition: .2s;
}

.botao:hover {

    background: var(--bg-secondary);

    border-color: var(--primary-light);
}

/* ==================================
   PAGINAÇÃO
================================== */

.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;

    margin: 40px 0;
}

.paginacao a {
    color: var(--primary-light);
    font-weight: 600;
}

.paginacao a:hover {
    text-decoration: underline;
}

/* ==================================
   DESTAQUE
================================== */

mark {
    background: #fff59d;
    color: #000;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: 600;
}

/* ==================================
   ÍCONES
================================== */

.fa-file-pdf {
    color: #e53935;
}

.fa-file-word {
    color: #1565c0;
}

.fa-file-excel {
    color: #2e7d32;
}

.fa-file-powerpoint {
    color: #ef6c00;
}

.fa-file-lines {
    color: #607d8b;
}

.fa-file-code {
    color: #ff9800;
}

.fa-envelope {
    color: #1976d2;
}

.fa-file-image {
    color: #8e24aa;
}

.fa-file {
    color: #9e9e9e;
}

/* TXT */
.fa-file-lines {
    color: #90a4ae;
}

/* XML */
.xml-icon {
    color: #f39c12;
}

/* HTML */
.html-icon {
    color: #e34f26;
}

/* ==================================
   RESPONSIVO
================================== */

@media (max-width: 1000px) {

    .top-search-inner,
    .top-search-filtros,
    .page-content {

        grid-template-columns: 1fr;

        padding-left: 16px;
        padding-right: 16px;
    }

    .logo-mini {
        margin-bottom: 12px;
    }

    .filtros-links {

        margin-top: 10px;

        flex-wrap: wrap;

        gap: 18px;
    }

    .search-form,
    .container {

        max-width: 100%;
    }
}

/* ==================================
   HOME LAYOUT
================================== */

.search-page{

    flex:1;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    padding:40px;

    text-align:center;

}

/* ==========================
   HOME
========================== */

.home-logo {

    font-size: 82px;

    font-weight: 700;

    margin-bottom: 12px;

    letter-spacing: -2px;

    white-space: nowrap;
}

.home-logo .omni {

    color: var(--primary-light);
}

.home-logo .search {

    color: var(--text);
}

.home-subtitle {

    color: var(--text-muted);

    font-size: 18px;

    margin-bottom: 50px;

    text-align: center;

    max-width: 800px;
}

.home-search-form{

    width:100%;

    display:flex;

    justify-content:center;

    margin-top:20px;

}

.home-search-wrapper{

    width:760px;

    max-width:95vw;

    min-height:62px;

    display:flex;

    align-items:center;

    padding:0 22px;

    border-radius:40px;

    background:var(--input-bg);

    border:1px solid var(--input-border);

    transition:.25s;

}

.home-search-wrapper:hover {

    background: var(--bg-secondary);
}

.home-search-wrapper i{

    margin-right:16px;

    color:var(--text-muted);

    font-size:18px;

}

.home-search-wrapper input{

    flex:1;

    background:transparent;

    border:none;

    outline:none;

    color:var(--text);

    font-size:18px;

    padding:18px 0;

}

.home-stats {

    margin-top: 50px;

    display: flex;

    gap: 20px;

    flex-wrap: wrap;

    justify-content: center;
}

.home-search-wrapper:focus-within{

    border-color:var(--primary-light);

    box-shadow:0 0 0 3px rgba(0,94,184,.15);

}

.stat-card {

    background: var(--bg-card);

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 24px;

    min-width: 220px;

    text-align: center;

    transition: .2s;
}

.stat-card:hover {

    border-color: var(--primary-light);

    transform: translateY(-2px);
}

.stat-card strong {

    display: block;

    font-size: 28px;

    color: var(--primary-light);

    margin-bottom: 8px;
}

.stat-card span {

    color: var(--text-muted);

    font-size: 13px;
}

/* ==================================
   FOOTER
================================== */

.footer {

    margin-top:auto;

    background: linear-gradient(
        90deg,
        #003893,
        #005EB8
    );

    padding: 20px 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,.95);
    text-decoration: none;
    font-size: 14px;
    transition: .2s;
}

.footer-links a:hover {

    color: white;

    text-decoration: underline;
}

.footer-copy {
    color: var(--footer-text);
    font-size: 13px;
    margin: 0;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-logo img:hover {
    opacity: 1;
}

/* Responsivo */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-logo img {
        height: 40px;
    }
}

/* ==================================
   USUÁRIO
================================== */

.user-area {

    margin-left: auto;

    display: flex;

    align-items: center;

    gap: 14px;
}

.user-name {

    color: var(--text-muted);

    font-size: 14px;
}

.user-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    background: var(--primary-light);

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: 700;

    cursor: pointer;
}

.user-avatar:hover {

    opacity: .9;
}

/* ==================================
   MODO IA
================================== */

.ai-button {

    background: linear-gradient(
        135deg,
        #003893,
        #005EB8
    );

    color: white;

    border-radius: 20px;

    padding: 8px 16px;

    font-weight: 600;
}

.ai-button:hover {

    opacity: .9;
}

/* ==================================
   CONTADORES
================================== */

.search-stats {

    margin-bottom: 25px;

    color: #9aa0a6;

    font-size: 13px;
}

.search-stats strong {

    color: #8ab4f8;
}

/* ==================================
   LOGIN NOVO
================================== */

.login-page{

    flex:1;

    display:flex;

    justify-content:center;

    align-items:center;

    flex-direction:column;

    padding:40px;

}

.login-box{

    width:520px;

    max-width:92vw;

    text-align:center;

}

.login-logo{

    font-size:82px;

    font-weight:700;

    letter-spacing:-2px;

    margin-bottom:12px;

    white-space:nowrap;

}

.login-logo .login-omni{

    color:var(--primary-light);

}

.login-logo .login-search{

    color:var(--text);

}

.login-input{

    display:flex;

    align-items:center;

    gap:15px;

    margin-top:18px;

    padding:0 20px;

    border:1px solid var(--input-border);

    background:var(--input-bg);

    border-radius:40px;

    transition:.2s;

}

.login-input:focus-within{

    border-color:var(--primary-light);

    box-shadow:0 0 0 3px rgba(0,94,184,.15);

}

.login-input i{

    color:var(--text-muted);

    width:20px;

    font-size:18px;

}

.login-input input{

    flex:1;

    border:none;

    outline:none;

    background:transparent;

    color:var(--text);

    padding:18px 0;

    font-size:16px;

}

.login-button{

    width:100%;

    margin-top:28px;

    padding:18px;

    border:none;

    border-radius:40px;

    background:linear-gradient(
        90deg,
        #003893,
        #005EB8
    );

    color:white;

    font-size:18px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

}

.login-button:hover{

    transform:translateY(-2px);

    box-shadow:0 12px 30px rgba(0,94,184,.25);

}

.login-button:active{

    transform:translateY(0);

}

/* ==================================
   MENU SUPERIOR DA HOME
================================== */

.top-right-menu{

    position: fixed;

    top: 20px;

    right: 25px;

    display: flex;

    align-items: center;

    gap: 14px;

    z-index: 9999;

}

/* Botão Tema */

.theme-button{

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition: .2s;

}

.theme-button:hover{

    background: var(--primary-light);

    transform: scale(1.05);

}

/* Avatar */

.user-avatar{

    width: 40px;

    height: 40px;

    border-radius: 50%;

    background: var(--primary-light);

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: bold;

    font-size: 15px;

}

/* Nome */

.user-name{

    color: var(--text);

    font-size: 15px;

    font-weight: 500;

}

/* Botão Sair */

.logout-button{

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 16px;

    border-radius: 24px;

    border: 1px solid var(--border);

    color: var(--text);

    background: transparent;

    transition: .2s;

}

.logout-button:hover{

    color: #dc3545;

    border-color: #dc3545;

    background: var(--bg-secondary);

}

/* ==================================
   BOTÃO TEMA - LOGIN
================================== */

.login-theme-button{

    position: fixed;

    top: 20px;

    right: 25px;

}