/* ==========================================================================
   Micro-SaaS Gerador de Propostas IA - Clean & Minimalist Design System
   Aesthetic: Refined SaaS, Ultra-thin Elegant Typography, Dual Theme (Dark/Light)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Tema Dark Clean (Padrão) */
    --bg-main: #0b0f19;
    --bg-surface: rgba(18, 26, 43, 0.6);
    --bg-surface-hover: rgba(28, 38, 60, 0.75);
    --bg-element: rgba(255, 255, 255, 0.03);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(99, 102, 241, 0.35);
    
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent-emerald: #10b981;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 8px 24px -6px rgba(99, 102, 241, 0.25);
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tema Light Clean (Claro Minimalista) */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-surface-hover: rgba(255, 255, 255, 1);
    --bg-element: rgba(0, 0, 0, 0.02);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);
    --border-accent: rgba(99, 102, 241, 0.25);
    
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --accent-emerald: #059669;
    --accent-purple: #9333ea;
    --accent-cyan: #0891b2;
    --accent-rose: #e11d48;
    
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-glow: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 8px 24px -6px rgba(79, 70, 229, 0.15);
}

/* Reset & Base Typography */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300; /* Fonte mais fina e elegante */
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings com Plus Jakarta Sans e traços finos */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500; /* Peso médio/fino para sofisticação */
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-indigo { color: var(--primary) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-rose { color: var(--accent-rose) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-muted { color: var(--text-secondary) !important; }

/* Container */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar Minimalista */
.navbar {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    font-size: 16px;
    color: white;
}

.brand-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-theme-toggle {
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-surface-hover);
}

.user-badge-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.user-name-text {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.btn-logout-icon {
    color: var(--text-tertiary);
    font-size: 15px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-logout-icon:hover {
    color: var(--accent-rose);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    filter: brightness(1.08);
}

.btn-secondary {
    background: var(--bg-element);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.2);
}

.btn-success {
    background: var(--accent-emerald);
    color: white;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

/* Badge Clean */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--gradient-glow);
    border: 1px solid var(--border-accent);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Cards com Design Clean Glassmorphism */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-hover);
}

/* Hero Section */
.hero {
    padding: 50px 0 30px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

/* Form Styles */
.capture-form-wrapper {
    max-width: 620px;
    margin: 0 auto 50px;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--accent-rose);
}

.input-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    transition: var(--transition);
    outline: none;
}

.input-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: var(--bg-surface-hover);
}

.input-control::placeholder {
    color: var(--text-tertiary);
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 5px;
}

/* Loader Section */
.loader-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 20px;
}

.spin-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.loader-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.loader-step-text {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 400;
    min-height: 24px;
}

/* Dashboard Section */
.dashboard-wrapper {
    display: none;
    margin-bottom: 60px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: var(--gradient-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-title h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 850px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.card-header-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-box.emerald { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.icon-box.purple { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }
.icon-box.indigo { background: rgba(99, 102, 241, 0.12); color: var(--primary); }
.icon-box.cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-element);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 300;
}

.feature-item i {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Timeline Action Plan */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-element);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.98rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.step-content p {
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-secondary);
}

/* Email Box */
.email-container {
    position: relative;
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 14px;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    white-space: pre-wrap;
    color: var(--text-primary);
    max-height: 380px;
    overflow-y: auto;
}

/* Custom Table for Dashboard */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.custom-table th {
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px;
    background: var(--bg-element);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 300;
    vertical-align: middle;
}

.custom-table td:first-child {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
    border-left: 1px solid var(--border-color);
}

.custom-table td:last-child {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    border-right: 1px solid var(--border-color);
}

.custom-table tr:hover td {
    background: var(--bg-surface-hover);
}

/* Modal System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog {
    width: 100%;
    max-width: 820px;
    max-height: 88vh;
}

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

.close-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 400;
    animation: slideUp 0.3s ease forwards;
}

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

/* Footer */
footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 300;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
