@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* --- DESIGN SYSTEM & VARIÁVEIS --- */
:root {
    --bg-main: #05050a;
    --bg-card: rgba(12, 12, 24, 0.65);
    --bg-card-hover: rgba(18, 18, 36, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(138, 43, 226, 0.35);
    
    /* Cores de Destaque */
    --primary: #8a2be2;
    --primary-glow: rgba(138, 43, 226, 0.25);
    --secondary: #00ffff;
    --secondary-glow: rgba(0, 255, 255, 0.15);
    --accent: #d946ef;
    --accent-glow: rgba(217, 70, 239, 0.2);
    
    /* Cores de Estado */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Tipografia */
    --font-header: 'Outfit', sans-serif;
    --font-editorial: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Textos */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    
    /* Efeitos */
    --glass-blur: blur(20px);
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --sidebar-width: 280px;
}

/* --- RESET & ESTRUTURA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 43, 226, 0.3) transparent;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.25);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.5);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Esferas de Brilho de Fundo */
.bg-glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    transition: all 1s ease;
}
.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -150px;
}

/* Marcas d'água */
.watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.watermark-svg {
    position: absolute;
    color: rgba(138, 43, 226, 0.03);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.watermark-left {
    width: 32%;
    height: auto;
    left: -5%;
    top: 15%;
    transform: rotate(-10deg);
}

.watermark-right-top {
    width: 28%;
    height: auto;
    right: -3%;
    top: 8%;
    transform: rotate(15deg);
    color: rgba(217, 70, 239, 0.03);
}

.watermark-right-bottom {
    width: 30%;
    height: auto;
    right: -2%;
    bottom: 5%;
    transform: rotate(-5deg);
    color: rgba(0, 255, 255, 0.02);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* --- CABEÇALHOS EDITORIAIS --- */
.editorial-heading {
    font-family: var(--font-editorial);
    font-weight: 800;
    font-size: 4.8rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.editorial-title {
    font-family: var(--font-editorial);
    font-weight: 750;
    font-size: 3.2rem;
    letter-spacing: -0.02em;
}

/* --- ELEMENTOS DE DESTAQUE & GRADIENTES --- */
.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 30%, #c084fc 70%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-alt {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    text-decoration: none;
    overflow: hidden;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.5s;
}

.glow-btn:hover::before {
    left: 100%;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.45);
    background: linear-gradient(135deg, #9b37fd 0%, #b862ff 100%);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-header);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: white;
}

.secondary-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 12px var(--primary-glow);
}

.badge {
    background: rgba(138, 43, 226, 0.12);
    color: #c084fc;
    border: 1px solid rgba(138, 43, 226, 0.25);
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

/* Card das Fontes Mapeadas */
.source-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.source-card:hover {
    border-color: var(--accent);
    background: rgba(217, 70, 239, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 70, 239, 0.1);
}

.source-status {
    font-size: 0.72rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-weight: 500;
}

/* ========================================== */
/* SEÇÃO DE NEWSLETTER ESTILIZADA             */
/* ========================================== */
.newsletter-card-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.newsletter-box {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 55px 40px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 10;
}

.newsletter-card-wrapper:focus-within .newsletter-box {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
}

.cultural-border-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.icon-placed {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #090912;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.icon-placed svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0.5;
}

.icon-t1 { top: -18px; left: 15%; }
.icon-t2 { top: -18px; left: 50%; transform: translateX(-50%); }
.icon-t3 { top: -18px; right: 15%; }
.icon-r1 { right: -18px; top: 30%; }
.icon-r2 { right: -18px; bottom: 30%; }
.icon-b1 { bottom: -18px; right: 20%; }
.icon-b2 { bottom: -18px; left: 50%; transform: translateX(-50%); }
.icon-b3 { bottom: -18px; left: 20%; }
.icon-l1 { left: -18px; top: 30%; }
.icon-l2 { left: -18px; bottom: 30%; }

.newsletter-card-wrapper:hover .icon-placed {
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

.newsletter-card-wrapper:focus-within .icon-placed {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 12px var(--secondary-glow);
    transform: scale(1.15);
}

.newsletter-card-wrapper:focus-within .icon-t2 {
    transform: translateX(-50%) rotate(180deg) scale(1.15);
}
.newsletter-card-wrapper:focus-within .icon-b2 {
    transform: translateX(-50%) scale(1.15);
}

/* Navbar Login Widget Style (Newsletter-inspired) */
.nav-login-wrapper {
    position: relative;
    padding: 4px;
    z-index: 100;
}

.nav-login-box {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 10;
}

.nav-login-wrapper:focus-within .nav-login-box {
    border-color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
}

.nav-login-wrapper:hover .nav-login-box {
    border-color: var(--primary);
}

.nav-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.nav-icons .icon-placed {
    width: 26px;
    height: 26px;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.nav-icons .icon-n1 {
    top: -13px;
    left: 15%;
}

.nav-icons .icon-n2 {
    top: -13px;
    right: 15%;
}

.nav-icons .icon-n3 {
    bottom: -13px;
    left: 50%;
    transform: translateX(-50%);
}

.nav-login-wrapper:hover .icon-placed {
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 8px var(--primary-glow);
}

.nav-login-wrapper:focus-within .icon-placed {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
    transform: scale(1.15);
}

.nav-login-wrapper:focus-within .icon-n3 {
    transform: translateX(-50%) scale(1.15);
}

/* Compact input and button */
.form-control.compact {
    padding: 8px 12px;
    font-size: 0.82rem;
    height: 36px;
}

.glow-btn.compact {
    padding: 8px 16px;
    font-size: 0.82rem;
    height: 36px;
    border-radius: var(--radius-sm);
}

/* ========================================== */
/* MÓDULO CHECKLIST DE DOCUMENTOS (RESTRICTED)*/
/* ========================================== */
.doc-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    flex-wrap: wrap;
    gap: 15px;
}

.doc-item-row:last-child {
    border-bottom: none;
}

.doc-item-row:hover {
    background: rgba(255, 255, 255, 0.015);
}

.doc-check-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    min-width: 280px;
}

/* Custom Checkbox */
.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    background: transparent;
    color: transparent;
}

.custom-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.custom-checkbox svg {
    width: 14px;
    height: 14px;
}

.doc-info-block {
    display: flex;
    flex-direction: column;
}

.doc-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.doc-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.doc-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.doc-date-picker {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

.doc-date-picker:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 90px;
    text-align: center;
}

.status-badge.valid {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.expired {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-badge.none {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

/* --- SEÇÕES INTERNAS DO APP --- */
.app-section {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-section.active {
    display: block;
    opacity: 1;
}

/* 1. LANDING PAGE HERO */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    z-index: 10;
}

.landing-nav {
    position: absolute;
    top: 0;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-logo svg {
    width: 34px;
    height: 34px;
    fill: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

.hero-content {
    max-width: 850px;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* Landing Features Grid */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(138, 43, 226, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--secondary);
    border: 1px solid rgba(138, 43, 226, 0.25);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

/* Pricing Cards */
.pricing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 100px 20px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.price-tag {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 20px 0;
    font-family: var(--font-header);
}

.price-tag span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    position: relative;
}

.pricing-card.popular::after {
    content: "RECOMENDADO";
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.pricing-features-list {
    list-style: none;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.pricing-features-list li svg {
    color: var(--success);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Modal de Assinatura */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 4, 8, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.checkout-card {
    max-width: 500px;
    width: 100%;
    border-color: var(--border-color);
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px var(--primary-glow);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

select.form-control option {
    background-color: #090912;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
}

.close-btn:hover {
    color: white;
}

/* 2. DASHBOARD & SIDEBAR */
.app-container {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);
    background: rgba(6, 6, 12, 0.98);
    display: flex;
    flex-direction: column;
    padding: 30px 24px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 50;
}

.sidebar-logo {
    margin-bottom: 45px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-smooth);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(138, 43, 226, 0.08);
    color: white;
}

.nav-item.active {
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding-left: 13px;
}

.sidebar-user {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 500;
}

/* Área de Conteúdo Principal */
.app-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 45px;
    max-width: 1300px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

/* Métricas */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-value {
    font-size: 2.1rem;
    font-weight: 800;
    margin-top: 5px;
    font-family: var(--font-header);
}

/* Lista de Projetos */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.project-actions {
    display: flex;
    gap: 8px;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.action-icon-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.action-icon-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--error);
}

/* Estado Vazio */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* 3. ASSISTENTE DE CRIAÇÃO (WIZARD) */
.wizard-container {
    width: 100%;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.wizard-steps::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step-indicator {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.step-indicator.active .step-number {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-indicator.completed .step-number {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.step-indicator.active .step-label {
    color: white;
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

/* Custom Grid de Modelos */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.template-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.01);
}

.template-card:hover {
    border-color: var(--primary);
    background: rgba(138, 43, 226, 0.05);
}

.template-card.selected {
    border-color: var(--secondary);
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 0 0 15px var(--secondary-glow);
}

/* Área de Upload */
.upload-area {
    border: 2px dashed var(--border-color);
    padding: 40px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.01);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(138, 43, 226, 0.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Tabela de Orçamento */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.budget-table th, .budget-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.budget-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

/* 4. VISUALIZADOR DO PROJETO */
.preview-container {
    max-width: 900px;
    margin: 0 auto;
}

.preview-paper {
    background: #090912;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    margin-top: 25px;
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
}

.preview-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.preview-section {
    margin-bottom: 35px;
}

.preview-section h3 {
    color: var(--secondary);
    font-size: 1.25rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 6px;
}

.editable-field {
    position: relative;
    border: 1px solid transparent;
    padding: 10px;
    border-radius: 6px;
    min-height: 50px;
}

.editable-field:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

.editable-field::after {
    content: 'Clique para editar';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.editable-field:hover::after {
    opacity: 0.9;
}

/* COMPILAÇÃO PROGRESSO */
.loading-generation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--primary);
    border-bottom-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 25px;
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.ai-status-text {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}

.ai-log-list {
    max-width: 420px;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-secondary);
    list-style: none;
    text-align: left;
    margin-top: 10px;
}

.ai-log-list li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-log-list li.done {
    color: var(--success);
}

.ai-log-list li.done::before {
    content: '✓';
    font-weight: bold;
}

.ai-log-list li.pending::before {
    content: '●';
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* Credit Card Preview */
.credit-card-preview-container {
    width: 100%;
    max-width: 320px;
    perspective: 1000px;
    margin-top: 15px;
}

.credit-card-preview {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #4a1d96 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-header);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.credit-card-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.card-preview-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    font-style: italic;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-preview-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.15em;
    word-spacing: 0.1em;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-family: monospace;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
    }
    .user-info, .sidebar-logo span, .nav-item span {
        display: none;
    }
    .app-sidebar {
        padding: 20px 10px;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    .app-content {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .landing-nav {
        padding: 16px;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        position: relative;
    }
    .nav-login-wrapper {
        width: 100%;
        max-width: 320px;
    }
    .form-control.compact {
        width: 100%;
    }
    .nav-icons {
        display: none !important;
    }
    .editorial-heading {
        font-size: 2.3rem;
        line-height: 1.25;
    }
    .editorial-title {
        font-size: 1.8rem;
    }
    .hero-description {
        font-size: 1.05rem;
    }
    .app-container {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        height: 65px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        border-right: none;
        border-top: 1px solid var(--border-color);
        background: rgba(6, 6, 12, 0.95);
        backdrop-filter: blur(15px);
        z-index: 1000;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    }
    .sidebar-logo {
        display: none;
    }
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        margin: 0;
        gap: 0;
    }
    .nav-item {
        flex: 1;
        justify-content: center;
        padding: 10px 0;
        border-left: none !important;
        border-bottom: none !important;
        border-radius: 8px;
        margin: 0;
    }
    .nav-item.active {
        background: rgba(138, 43, 226, 0.12);
        color: var(--secondary) !important;
    }
    .nav-item.active svg {
        filter: drop-shadow(0 0 5px var(--secondary));
    }
    .sidebar-user {
        display: none;
    }
    .app-content {
        margin-left: 0;
        padding: 20px 15px 95px 15px; /* Spacing for the bottom nav bar */
    }
    
    /* Wizard Steps Horizontal compact list on mobile */
    .wizard-steps {
        flex-direction: row;
        justify-content: space-between;
        gap: 5px;
        margin-bottom: 25px;
    }
    .wizard-steps::after {
        display: none;
    }
    .step-indicator {
        flex-direction: column;
        align-items: center;
        flex: 1;
    }
    .step-indicator .step-label {
        display: none; /* Hide step texts on mobile for fit */
    }
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    /* Layout Grids Stacking Overrides */
    .wizard-grid-layout, .search-filter-grid, .input-grid-2, .input-grid-3, .settings-grid-layout, .billing-content-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .search-filter-grid div {
        width: 100%;
    }
    
    .preview-paper {
        padding: 20px 15px;
    }
    .icon-placed {
        display: none;
    }
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* --- IMPRESSÃO --- */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .app-sidebar, .wizard-navigation, .dashboard-header, .preview-actions, .badge, .wizard-steps, .wizard-step-content, .checkout-modal, .bg-glow-orb, .watermark-container, #newsletter-secao, #documents-panel {
        display: none !important;
    }
    .app-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .preview-container {
        max-width: 100% !important;
    }
    .preview-paper {
        background: white !important;
        color: black !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .preview-section h3 {
        color: #111827 !important;
        border-bottom: 2px solid #111827 !important;
    }
    .editable-field:hover {
        border-color: transparent !important;
        background: transparent !important;
    }
    .editable-field::after {
        display: none !important;
    }
}
