﻿:root {
    --taticca-blue-dark: #1E2845;
    --taticca-blue-medium: #253A6D;
    --taticca-blue-light: #0094BB;
    --taticca-green-main: #53C1AB;
    --taticca-green-medium: #27AD88;
    --taticca-gray-light: #D1D3D4;
    --taticca-gray-xlight: #DCDEDE;
    --taticca-blue-petroleum: #183242;
    --taticca-red-accent: #CA171E;
    --surface-glass: rgba(255, 255, 255, 0.70);
    --surface-glass-strong: rgba(255, 255, 255, 0.80);
    --surface-glass-border: rgba(255, 255, 255, 0.55);
    --surface-glass-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    --surface-glass-blur: blur(6px);
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background: #f5f7fa;
    color: #222;
    margin: 0;
}

.app {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== SIDEBAR (MENU LATERAL) ===== */
.sidebar {
    width: 260px;
    background: var(--taticca-blue-dark);
    color: #fff;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-top {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .brand {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--taticca-green-main);
    letter-spacing: 0.5px;
    text-decoration: none;
    display: block;
}

.sidebar-user-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--taticca-green-main), var(--taticca-green-medium));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(83, 193, 171, 0.3);
    flex-shrink: 0;
}

.sidebar-avatar-image {
    background: none;
    box-shadow: none;
    width: auto;
    height: auto;
    min-width: 90px;
    min-height: 90px;
    padding: 0;
    overflow: visible;
}

.sidebar-avatar-image img {
    width: auto;
    height: 90px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
}

.sidebar-user-text {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.3px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-details {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.3;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 999px;
}

.sidebar-avatar-icon {
    width: 24px;
    height: 24px;
    color: #fff;
}

.sidebar-user-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.home-avatar-footer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: block;
    animation: avatar-pop-in 0.6s ease-out both;
}

.home-avatar-footer-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
    padding: 8px;
}

.home-avatar-footer-image {
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--taticca-green-main), var(--taticca-green-medium));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.home-avatar-footer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-avatar-footer-text {
    display: none;
}

@keyframes avatar-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.4) translateY(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.15) translateY(0);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

.sidebar-user-greeting {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    opacity: 0.82;
    line-height: 1.4;
}

body.home-page,
body.home-page .app,
body.home-page .content,
body.home-page .dashboard-container {
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.home-page .home-avatar-footer {
    display: block;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-footer {
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

    .sidebar-footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

.module-logout {
    color: rgba(202, 23, 30, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

    .module-logout .module-icon {
        color: rgba(202, 23, 30, 0.8) !important;
    }

    .module-logout:hover {
        background: rgba(202, 23, 30, 0.12) !important;
    }

.sidebar-module {
    margin-bottom: 2px;
    padding: 0 16px;
}

.module-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.4);
    margin: 16px 0 6px 8px;
    font-weight: 600;
}

.module-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #cbd5e1;
}

.module-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Estados dos m�dulos */
.module-available {
    cursor: pointer;
    color: #fff;
}

    .module-available .module-icon {
        color: var(--taticca-green-main);
    }

    .module-available:hover {
        background: rgba(83, 193, 171, 0.12);
        transform: translateX(2px);
    }

.module-soon {
    cursor: not-allowed;
    opacity: 0.5;
    color: #94a3b8;
}

    .module-soon .module-icon {
        color: #f59e0b;
    }

.module-locked {
    cursor: not-allowed;
    opacity: 0.4;
    color: #64748b;
}

    .module-locked .module-icon {
        color: #dc2626;
    }

/* ===== CONTE�DO PRINCIPAL ===== */
.content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
    position: relative;
    background: #f5f7fa;
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
}

    .content::before {
        content: "";
        position: fixed;
        top: 0;
        left: 260px;
        right: 0;
        bottom: 0;
        background-image: url("/static/assets/img/bg-mesh.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.99;
        pointer-events: none;
        z-index: 0;
    }

.dashboard-header {
    display: none;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--taticca-blue-dark);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--taticca-green-main), var(--taticca-green-medium));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(83, 193, 171, 0.25);
    border: 2px solid #fff;
}

.user-name {
    color: #374151;
    font-weight: 500;
}

.logout-link {
    color: var(--taticca-blue-light);
    text-decoration: none;
    font-weight: 500;
}

    .logout-link:hover {
        color: var(--taticca-blue-medium);
        text-decoration: underline;
    }

/* ===== T�TULO DO M�DULO (INSTITUCIONAL) ===== */
.module-title-banner {
    background: #fff;
    border-bottom: 2px solid var(--taticca-green-main);
    padding: 12px 32px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    min-height: auto;
}

.module-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--taticca-blue-dark);
    letter-spacing: 0.3px;
}

.module-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

    .module-user-info .user-name {
        color: #374151;
        font-weight: 500;
    }

    .module-user-info .logout-link {
        color: var(--taticca-blue-light);
        text-decoration: none;
        font-weight: 500;
    }

        .module-user-info .logout-link:hover {
            color: var(--taticca-blue-medium);
            text-decoration: underline;
        }

.dashboard-container {
    padding: 20px 32px;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== CARDS DO DASHBOARD ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1400px;
    box-sizing: border-box;
    width: 100%;
}

.card {
    background: var(--surface-glass);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--surface-glass-shadow);
    border: 1px solid var(--surface-glass-border);
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
}

    .card h3 {
        margin: 0 0 8px 0;
        font-size: 18px;
        color: var(--taticca-blue-dark);
        font-weight: 600;
    }

.card-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.card-primary {
    background: linear-gradient(135deg, rgba(83, 193, 171, 0.10) 0%, var(--surface-glass-strong) 100%);
    border-left: 4px solid var(--taticca-green-main);
}

.card-secondary {
    background: var(--surface-glass);
}

/* ===== BOT�ES ===== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--taticca-green-main);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--taticca-green-medium);
        box-shadow: 0 4px 12px rgba(83, 193, 171, 0.3);
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #fff;
    color: var(--taticca-blue-dark, #1e293b);
    border: 1px solid #d1d5db;
}

    .btn-secondary:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.btn-download {
    background: var(--taticca-blue-light);
    color: #fff;
    padding: 8px 14px;
    font-size: 13px;
}

    .btn-download:hover {
        background: var(--taticca-blue-medium);
    }

/* ===== LISTA DE PROJETOS ===== */
.project-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface-glass);
    border: 1px solid var(--surface-glass-border);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

    .project-item:hover {
        background: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        border-color: var(--taticca-blue-light);
    }

.project-info {
    flex: 1;
}

.project-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--taticca-blue-dark);
    margin-bottom: 4px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.project-code {
    font-weight: 500;
    color: #374151;
}

.project-separator {
    color: #d1d5db;
}

.project-status {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-reviewed {
    background: #d1fae5;
    color: #065f46;
}

.status-preview {
    background: #fef3c7;
    color: #92400e;
}

.project-action {
    margin: 0;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 32px 16px;
    font-style: italic;
}

/* ===== INPUTS E FORMS (GERAL) ===== */
input, select {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 8px 0 16px 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

/* width: 100% com padding so cabe com border-box; sem isto o campo vaza para o vizinho. */
input, select, textarea {
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
}

/* Caixa de marcar nao estica nem ganha a margem dos campos de texto. */
input[type="checkbox"], input[type="radio"] {
    display: inline-block;
    width: auto;
    margin: 0;
    vertical-align: middle;
}

/* Formulario em linha: campos e botao alinhados pela base, sem a margem dos formularios empilhados. */
.campos-em-linha {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

    .campos-em-linha input,
    .campos-em-linha select {
        margin: 0;
        height: 38px;
    }

    .campos-em-linha input[type="file"] {
        padding: 6px;
        line-height: 24px;
        background: #fff;
    }

    .campos-em-linha .btn {
        height: 38px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .campos-em-linha label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 4px;
    }

.center-card {
    width: 340px;
    margin: 60px auto;
    background: var(--surface-glass);
    padding: 20px;
    border-radius: 6px;
    box-shadow: var(--surface-glass-shadow);
    border: 1px solid var(--surface-glass-border);
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
}

/* ===== ALERTAS ===== */
.alert.critical {
    background: #ffe9e9;
    padding: 10px;
    border-left: 4px solid #e11d48;
}

.alert.important {
    background: #fff7e6;
    padding: 10px;
    border-left: 4px solid #f59e0b;
}

.alert.info {
    background: #eef2ff;
    padding: 10px;
    border-left: 4px solid #6366f1;
}

/* ===== TABELAS ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        border: 1px solid #e6eef5;
        padding: 8px;
        text-align: left;
    }

/* ===== TATICCA UI � CARDS (PADR�O �NICO) ===== */
.t-card {
    background: var(--surface-glass);
    border: 1px solid var(--surface-glass-border);
    border-radius: 16px;
    box-shadow: var(--surface-glass-shadow);
    padding: 24px;
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
    box-sizing: border-box;
    width: 100%;
}

.t-card--tight {
    padding: 16px;
}

.t-card--clickable {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

.t-card--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    border-color: rgba(15, 23, 42, 0.12);
}

.t-card__title {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.t-card__subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(15, 23, 42, 0.68);
    margin: 0 0 16px 0;
}

.t-card__actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== KNOWLEDGE BASE / M�DULO 6 ===== */
.knowledge-base-container {
    display: flex;
    flex-direction: column;
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.00);
    border-radius: 8px;
}

.kb-search-container {
    margin-bottom: 48px;
    z-index: 10;
    /* mesma coluna dos cartoes (.knowledge-mindmap, 700 px), para alinharem */
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.kb-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.kb-search-icon {
    width: 20px;
    height: 20px;
    color: #53C1AB;
    margin-right: 12px;
    flex-shrink: 0;
}

.kb-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #0f172a;
    background: transparent;
    padding: 0;
}

.kb-search-input::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

.kb-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 12px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.kb-search-clear:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.kb-search-clear svg {
    width: 16px;
    height: 16px;
}

.kb-search-status {
    font-size: 12px;
    color: #666;
    padding: 12px;
    margin-top: 8px;
}

.kb-search-results {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* ===== MINDMAP LAYOUT ===== */
.knowledge-mindmap {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.mindmap-axis {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(83, 193, 171, 0.15), transparent);
    transform: translateX(-1px);
    z-index: 0;
    pointer-events: none;
    display: none;
}

/* ===== CARDS NO MINDMAP ===== */
.kb-card {
    display: flex;
    gap: 0;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    width: 100%;
}

.kb-card-connector {
    position: absolute;
    left: 50%;
    top: -32px;
    width: 2px;
    height: 32px;
    background: rgba(83, 193, 171, 0.15);
    transform: translateX(-1px);
    display: none;
}

.kb-card:first-child .kb-card-connector {
    display: none;
}

.kb-card-content {
    width: 100%;
    background: var(--surface-glass);
    border: 1px solid var(--surface-glass-border);
    border-radius: 16px;
    box-shadow: var(--surface-glass-shadow);
    padding: 28px;
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
}

.kb-card-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.kb-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(83, 193, 171, 0.12);
    color: var(--taticca-green-main);
}

/* Ícones SVG da interface (templates/_icones.html): alinhados ao texto. */
.icone {
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.kb-titulo-com-icone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-titulo-com-icone .icone {
    color: var(--taticca-green-main);
}

.action-ico .icone {
    vertical-align: middle;
}

.kb-card-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.kb-card-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.68);
    margin: 0 0 20px 0;
}

/* ===== BOT�ES ===== */
.kb-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--taticca-green-main);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-btn-view:hover {
    background: var(--taticca-green-medium);
    box-shadow: 0 4px 12px rgba(83, 193, 171, 0.3);
    transform: translateY(-1px);
}

.kb-btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== M�DULOS E SUBM�DULOS ===== */
.kb-modules {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.kb-modules-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(83, 193, 171, 0.08);
    color: #0f172a;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(83, 193, 171, 0.2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.kb-modules-toggle:hover {
    background: rgba(83, 193, 171, 0.15);
    border-color: rgba(83, 193, 171, 0.4);
}

.kb-toggle-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.kb-modules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.kb-modules-list.active {
    max-height: 2000px;
    margin-top: 12px;
}

.kb-modules-list li {
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.kb-modules-list li:last-child {
    margin-bottom: 0;
}

.kb-modules-list li:hover {
    background: #fff;
    border-color: var(--taticca-green-main);
    box-shadow: 0 2px 8px rgba(83, 193, 171, 0.15);
    transform: translateX(4px);
}

.kb-glossary-list li {
    cursor: default;
}

.kb-glossary-list li:hover {
    background: #f9fafb;
    border-color: rgba(15, 23, 42, 0.08);
    transform: none;
}

.kb-glossary-list strong {
    color: #53C1AB;
    font-weight: 600;
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 32px 16px;
    font-style: italic;
}

/* ===== MODAL PDF ===== */
.pdf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.pdf-modal.active {
    display: flex;
}

.pdf-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.pdf-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
    height: 800px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.pdf-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.pdf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pdf-modal-close:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.pdf-modal-close svg {
    width: 20px;
    height: 20px;
}

.pdf-modal-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

.pdf-modal-body iframe {
    border: none;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .knowledge-base-container {
        padding: 20px;
    }

    .kb-card-content {
        padding: 20px;
    }

    .kb-card-title {
        font-size: 18px;
    }
}

/* ===== KNOWLEDGE BASE HOME (M�DULO 6 - HOME) ===== */
.knowledge-base-home {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.knowledge-base-home-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.kb-home-card {
    width: 100%;
    margin: 0;
}

.kb-home-card .t-card__title {
    font-size: 20px;
    margin-bottom: 12px;
}

.kb-home-card .t-card__subtitle {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .knowledge-base-home {
        padding: 20px;
    }

    .knowledge-base-home-cards {
        gap: 16px;
    }
}

/* ===== LOGIN PAGE - NOVO DESIGN ELEGANTE ===== */

body.login-page {
    background: #f5f7fa;
    overflow: hidden;
    position: relative;
}

    .login-page::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url("/static/assets/img/bg-mesh.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.99;
        pointer-events: none;
        z-index: 0;
    }

/* Container e Card */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: var(--surface-glass);
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(83, 193, 171, 0.15);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Card */
.login-header {
    background: linear-gradient(135deg, rgba(83, 193, 171, 0.12) 0%, rgba(255, 255, 255, 0.8) 100%);
    padding: 48px 32px 32px;
    text-align: center;
    border-bottom: 1px solid rgba(83, 193, 171, 0.2);
}

.login-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--taticca-green-main);
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.login-description {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.header-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--taticca-green-main), transparent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* Body do Card */
.login-body {
    padding: 40px 32px;
}

/* Alert/Error */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.alert-error {
    background: rgba(202, 23, 30, 0.1);
    border: 1px solid rgba(202, 23, 30, 0.2);
    color: #CA171E;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 38px;
    border: 2px solid #E5E8EB;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #FFFFFF;
    transition: all 0.3s ease;
    color: #0f172a;
}

.form-input::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

.form-input:focus {
    outline: none;
    border-color: var(--taticca-green-main);
    background: rgba(83, 193, 171, 0.02);
    box-shadow: 0 0 0 4px rgba(83, 193, 171, 0.1);
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: rgba(15, 23, 42, 0.4);
    pointer-events: none;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: rgba(15, 23, 42, 0.4);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--taticca-green-main);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Bot�o */
.login-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--taticca-green-main) 0%, #35A488 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(83, 193, 171, 0.3);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Footer */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E8EB;
    text-align: center;
}

.footer-label {
    font-size: 11px;
    color: rgba(15, 23, 42, 0.5);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.credentials {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credentials code {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #0f172a;
    background: rgba(83, 193, 171, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
}

/* Responsivo */
@media (max-width: 480px) {
    .login-card {
        border-radius: 16px;
        max-width: 100%;
    }

    .login-header {
        padding: 36px 24px 24px;
    }

    .login-title {
        font-size: 32px;
    }

    .login-body {
        padding: 28px 24px;
    }

    .login-form {
        gap: 20px;
    }

    .form-input {
        padding: 11px 12px 11px 34px;
    }
}

/* ===== LOGIN PAGE - LAYOUT LANDSCAPE (DEITADO) ===== */

body.login-page {
    background: linear-gradient(135deg, #F8F9FB 0%, #F0F4F8 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* Container e Card - LAYOUT LANDSCAPE */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 900px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(83, 193, 171, 0.15);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Card - LADO ESQUERDO */
.login-header {
    background: linear-gradient(135deg, rgba(83, 193, 171, 0.15) 0%, rgba(83, 193, 171, 0.08) 100%);
    padding: 48px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(83, 193, 171, 0.15);
}

.login-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--taticca-green-main);
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.login-description {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
    margin: 0 0 16px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.header-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--taticca-green-main), transparent);
    margin: 0;
    border-radius: 2px;
}

/* Body do Card - LADO DIREITO */
.login-body {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Alert/Error */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.alert-error {
    background: rgba(202, 23, 30, 0.1);
    border: 1px solid rgba(202, 23, 30, 0.2);
    color: #CA171E;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 11px 14px 11px 36px;
    border: 2px solid #E5E8EB;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    background: #FFFFFF;
    transition: all 0.3s ease;
    color: #0f172a;
}

.form-input::placeholder {
    color: rgba(15, 23, 42, 0.35);
}

.form-input:focus {
    outline: none;
    border-color: var(--taticca-green-main);
    background: rgba(83, 193, 171, 0.02);
    box-shadow: 0 0 0 4px rgba(83, 193, 171, 0.1);
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: rgba(15, 23, 42, 0.35);
    pointer-events: none;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: rgba(15, 23, 42, 0.35);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--taticca-green-main);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Bot�o */
.login-button {
    padding: 11px 20px;
    background: linear-gradient(135deg, var(--taticca-green-main) 0%, #35A488 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(83, 193, 171, 0.3);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    width: 14px;
    height: 14px;
}

/* Footer */
.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E5E8EB;
    text-align: center;
}

.footer-label {
    font-size: 10px;
    color: rgba(15, 23, 42, 0.4);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.credentials {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.credentials code {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #0f172a;
    background: rgba(83, 193, 171, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* RESPONSIVO - Mobile */
@media (max-width: 768px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .login-header {
        padding: 32px 24px;
        border-right: none;
        border-bottom: 1px solid rgba(83, 193, 171, 0.15);
    }

    .login-title {
        font-size: 36px;
    }

    .login-body {
        padding: 32px 24px;
    }

    .login-form {
        gap: 16px;
    }

    .form-input {
        padding: 10px 12px 10px 32px;
        font-size: 13px;
    }

    .login-button {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .login-card {
        border-radius: 16px;
    }

    .login-header {
        padding: 24px 16px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-description {
        font-size: 12px;
    }

    .login-body {
        padding: 20px 16px;
    }

    .form-label {
        font-size: 11px;
    }

    .form-input {
        padding: 9px 10px 9px 30px;
        font-size: 12px;
    }

    .footer-label {
        font-size: 9px;
    }

    .credentials code {
        font-size: 10px;
        padding: 5px 8px;
    }
}

/* ===== TELA DE BOAS-VINDAS (COMPACTA) ===== */
.welcome-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 260px);
    padding: 40px 20px;
}

.welcome-card {
    max-width: 600px;
    text-align: center;
    background: var(--surface-glass);
    padding: 40px 48px;
    border-radius: 16px;
    box-shadow: var(--surface-glass-shadow);
    border: 1px solid var(--surface-glass-border);
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
}

.welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.welcome-icon svg {
    width: 100%;
    height: 100%;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--taticca-blue-dark);
    margin: 0 0 12px 0;
}

.brand-accent-inline {
    color: var(--taticca-green-main);
}

.welcome-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.welcome-divider {
    width: 60px;
    height: 2px;
    background: var(--taticca-green-main);
    margin: 0 auto 20px;
    border-radius: 1px;
}

.welcome-instruction {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    margin: 0;
}

.welcome-modules {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.quick-access-module {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: left;
    transition: all 0.2s ease;
}

.quick-access-module:hover {
    background: #fff;
    border-color: var(--taticca-blue-light);
    box-shadow: 0 4px 12px rgba(0, 148, 187, 0.12);
}

.quick-access-module.disabled {
    opacity: 0.5;
}

.quick-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--taticca-green-main);
}

.quick-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--taticca-blue-dark);
    margin-bottom: 2px;
}

.quick-desc {
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 640px) {
    .welcome-container {
        min-height: calc(100vh - 200px);
        padding: 20px 16px;
    }

    .welcome-card {
        padding: 28px 24px;
    }

    .welcome-title {
        font-size: 24px;
    }

    .welcome-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
}

/* ===== SELECTION NEW (ESCOPADO) ===== */
body.page-selection-new .content {
    overflow: hidden;
}

body.page-selection-new .dashboard-container {
    padding: 16px 24px;
}

body.page-selection-new .selection-new {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 18px;
    background: var(--surface-glass);
    border-radius: 12px;
    box-shadow: var(--surface-glass-shadow);
    border: 1px solid var(--surface-glass-border);
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
}

body.page-selection-new .selection-title {
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--taticca-blue-dark);
    font-family: 'Avant Garde', 'Montserrat', 'Inter', sans-serif;
}

body.page-selection-new .selection-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    align-items: start;
}

body.page-selection-new .selection-field {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 10px;
    box-sizing: border-box;
}

body.page-selection-new .selection-field label {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

body.page-selection-new .selection-field *,
body.page-selection-new .selection-field *::before,
body.page-selection-new .selection-field *::after {
    box-sizing: border-box;
}

body.page-selection-new .selection-field input,
body.page-selection-new .selection-field select {
    width: 100%;
    padding: 7px 10px;
    margin: 0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

body.page-selection-new .selection-field input[type='file'] {
    padding: 6px 0;
}

body.page-selection-new .field-full {
    grid-column: 1 / -1;
}

body.page-selection-new .selection-field.field-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    border: none;
}

body.page-selection-new .field-actions .btn {
    width: 100%;
    max-width: 420px;
    padding: 9px 18px;
    font-size: 13px;
}

@media (max-width: 900px) {
    body.page-selection-new .selection-form {
        grid-template-columns: 1fr;
    }

    body.page-selection_new .field-actions {
        justify-content: stretch;
    }

    body.page-selection_new .field-actions .btn {
        max-width: none;
    }
}

mark {
    background-color: #fef08a;
    color: #0f172a;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  white-space: nowrap;
  width: 140px;
  min-width: 140px;
  text-align: center;
}
.action-ico {
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  transition: color 0.15s, opacity 0.15s;
  color: #222;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-ico:focus-visible {
  outline: 2px solid #253A6D;
  outline-offset: 2px;
}
.action-ico:hover {
  opacity: 0.7;
  color: #1976d2;
}

