:root {
    --bg-color: #0A0A0A;
    --bg-secondary: #0B1120;
    --card-bg: rgba(14, 16, 28, 0.75);
    --card-border: rgba(193, 122, 58, 0.25);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --copper: #C17A3A;
    --gold: #D4AF37;
    --gold-dark: #B8860B;
    --accent-gradient: linear-gradient(135deg, #B8860B 0%, #D4AF37 100%);
    --accent-glow: rgba(193, 122, 58, 0.4);
    --alert-red: rgba(239, 68, 68, 0.15);
    --alert-red-border: #EF4444;
    --alert-yellow: rgba(245, 158, 11, 0.15);
    --alert-yellow-border: #F59E0B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(160deg, #0A0A0A 0%, #0B1120 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    /* overflow-x removido para evitar bug de corte do html2canvas */
}

/* Background Blobs for dynamic design */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(193,122,58,0.35) 0%, rgba(0,0,0,0) 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(212,175,55,0.25) 0%, rgba(184,134,11,0.15) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Header */
.glass-header {
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
}

.logo .nexus { color: #FFFFFF; }
.logo .profit {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-title {
    text-align: right;
}

.header-title h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-title p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Cards & Sections */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 30px 60px -15px var(--accent-glow);
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    color: #D4AF37;
}

.section-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Forms & Inputs */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select.custom-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select.custom-select:focus {
    outline: none;
    border-color: #C17A3A;
    box-shadow: 0 0 0 3px rgba(193, 122, 58, 0.3);
}

select.custom-select option {
    background: var(--bg-color);
    color: white;
}

/* Pillar Groups */
.pillar-group {
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
}

.transversal-group {
    border: 1px dashed #D4AF37;
    background: rgba(212, 175, 55, 0.08);
}

.pillar-group h3 {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: #D4AF37;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* Questions & Radio Buttons */
.question-block {
    margin-bottom: 30px;
}

.question-block:last-child {
    margin-bottom: 0;
}

.question-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.option-label input[type="radio"] {
    margin-right: 15px;
    accent-color: #C17A3A;
    width: 18px;
    height: 18px;
}

.option-label:has(input:checked) {
    border-color: #C17A3A;
    background: rgba(193, 122, 58, 0.08);
    box-shadow: inset 0 0 10px rgba(193, 122, 58, 0.15);
}

.option-label span {
    font-size: 14px;
    color: #CBD5E1;
}

/* Buttons */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
}

button {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
    box-shadow: 0 10px 20px -8px rgba(212, 175, 55, 0.5);
    width: 100%;
    max-width: 400px;
    font-weight: 800;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -8px rgba(212, 175, 55, 0.7);
    filter: brightness(1.08);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-cta {
    background: linear-gradient(135deg, #B8860B, #D4AF37);
    color: #000000;
    box-shadow: 0 10px 20px -8px rgba(212, 175, 55, 0.5);
}

.btn-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.hidden {
    display: none !important;
}

/* Report Styles */
.report-header {
    text-align: center;
    margin-bottom: 40px;
}

.report-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    color: #D4AF37;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    letter-spacing: 0.5px;
}

.alert-card {
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    border-left: 6px solid;
    background: rgba(0,0,0,0.3);
}

.alert-critical {
    border-color: var(--alert-red-border);
    background-color: var(--alert-red);
}

.alert-warning {
    border-color: var(--alert-yellow-border);
    background-color: var(--alert-yellow);
}

.alert-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-critical .alert-title { color: #EF4444; }
.alert-warning .alert-title { color: #F59E0B; }

.alert-text {
    font-size: 15px;
    color: #E2E8F0;
    line-height: 1.7;
}

.alert-action {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-weight: 600;
    color: #D4AF37;
}

/* PDF Theme was removed in favor of native DOCX template styling */

/* Responsive */
@media (max-width: 768px) {
    .glass-card { padding: 24px; }
    .grid-2-col { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; }
    button { width: 100%; }
}

/* CLASSES DE TRANSIÇÃO DE TELA */
.hidden {
    display: none !important;
}
.active {
    display: block;
}

/* MASTER DASHBOARD TABLES */
#table-consultores th {
    background-color: rgba(15, 23, 42, 0.8);
    font-weight: 600;
}
#table-consultores td {
    padding: 12px 10px;
    border-bottom: 1px solid #1e293b;
    vertical-align: middle;
}
#table-consultores tr:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

/* ── Alert Success ───────────────────────────────────────────────── */
.alert-success {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}
.alert-success .alert-title { color: #10B981; }

/* ── Glossário Tooltip ───────────────────────────────────────────── */
.glossary-term {
    position: relative;
    border-bottom: 1px dashed rgba(193, 122, 58, 0.55);
    cursor: help;
    color: inherit;
    display: inline;
}

.glossary-term::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 300px;
    width: max-content;
    white-space: normal;
    border: 1px solid rgba(193, 122, 58, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 9999;
}

.glossary-term:hover::after,
.glossary-term.tooltip-active::after {
    opacity: 1;
}

/* ── Toast de notificação ────────────────────────────────────────── */
.nx-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #F59E0B;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    max-width: 340px;
    pointer-events: none;
}
.nx-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive adicional ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container { padding: 0 16px; }
    .glass-card { padding: 28px 24px; }
}

@media (max-width: 600px) {
    .glass-card { padding: 20px 16px; border-radius: 16px; }
    .glass-header { padding: 14px 5%; }
    .glass-header img { height: 70px !important; }
    .section-header h2 { font-size: 20px; }
    .alert-title { font-size: 17px; }
    .alert-text { font-size: 14px; }
    .action-bar { flex-direction: column; gap: 12px; }
    .action-bar button { width: 100%; max-width: 100%; }
    button { letter-spacing: 0; }
    #report-company-name, #report-date { font-size: 13px; }
}

/* ── BOTÕES PEQUENOS PARA A TABELA ────────────────────────────────── */
.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-right: 5px;
}
.btn-small.btn-reset {
    background: rgba(255, 170, 0, 0.2);
    color: #FFAA00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}
.btn-small.btn-reset:hover {
    background: rgba(255, 170, 0, 0.4);
}
.btn-small.btn-delete {
    background: rgba(255, 68, 68, 0.2);
    color: #FF4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}
.btn-small.btn-delete:hover {
    background: rgba(255, 68, 68, 0.4);
}
