/* ============================================
   DESIGN SYSTEM - iLimentoring
   Cores: Roxo #7C3AED, Cinza Claro #E5E7EB
   Tipografia: Poppins (títulos), Inter (corpo)
   ============================================ */

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

:root {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #6D28D9;
    --background: #FAFBFC;
    --foreground: #1F2937;
    --border: #E5E7EB;
    --muted: #F3F4F6;
    --muted-foreground: #6B7280;
    --success: #10B981;
    --radius: 8px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 100%;
    width: auto;
}

/* ============================================
   PÁGINA INICIAL
   ============================================ */

.home-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, #FAFBFC 0%, #F3F4F6 100%);
    position: relative;
    overflow: hidden;
}

.home-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 900px;
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
    z-index: 1;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.home-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 300px;
}

.home-logo {
    height: 200px;
    width: auto;
}

.home-content {
    color: white;
    position: relative;
}

.compass-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: spin 20s linear infinite;
}

.compass-icon-large {
    font-size: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 20s linear infinite;
}

.compass-image-large {
    width: 280px;
    height: 280px;
    object-fit: contain;
    animation: spin 20s linear infinite;
}

.home-logo-top {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10;
}

.home-logo-white {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.compass-selector {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.compass-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.compass-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.compass-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-color: white;
}

.home-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
}

.home-content h1 .highlight {
    color: #FFD700;
}

.home-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.home-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
}

.feature-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.feature-item span {
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: #F3F4F6;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--muted);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.form-page {
    flex: 1;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #FAFBFC 0%, #F3F4F6 100%);
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.progress-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.progress-step {
    height: 4px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.progress-step.active {
    background: var(--primary);
}

.form-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--foreground);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.success-message {
    display: none;
    background: #D1FAE5;
    color: #065F46;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #A7F3D0;
    animation: slideIn 0.3s ease;
}

.success-message.show {
    display: block;
}

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

/* ============================================
   TABELAS
   ============================================ */

.action-table,
.companies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.action-table thead,
.companies-table thead {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: white;
}

.action-table th,
.companies-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.action-table th small {
    display: block;
    font-weight: 400;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
}



.action-table td,
.companies-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.action-table tbody tr:hover,
.companies-table tbody tr:hover {
    background-color: #F9FAFB;
}

.action-table tbody tr:last-child td,
.companies-table tbody tr:last-child td {
    border-bottom: none;
}

.table-input,
.company-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    min-height: 200px;
}

.company-input-large {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    min-height: 250px;
    resize: vertical;
}

.table-input:focus,
.company-input:focus,
.company-input-large:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}



.ranking-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* ============================================
   NAVEGAÇÃO DO FORMULÁRIO
   ============================================ */

.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.form-navigation .btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.form-navigation .btn-next {
    margin-left: auto;
}

/* ============================================
   PÁGINA DE RESULTADOS
   ============================================ */

.results-page {
    flex: 1;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #FAFBFC 0%, #F3F4F6 100%);
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-header-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-header h1 {
    font-size: 2rem;
}

.results-header p {
    color: var(--muted-foreground);
}

.result-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.result-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-item {
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.result-item-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.result-item-value {
    color: var(--foreground);
    font-weight: 500;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-content h1 {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1.5rem;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
        margin-left: 0;
    }

    .action-table,
    .companies-table {
        font-size: 0.85rem;
    }

    .action-table th,
    .action-table td,
    .companies-table th,
    .companies-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .form-section {
        padding: 1rem;
    }

    .home-content h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    .action-table,
    .companies-table {
        font-size: 0.75rem;
    }

    .action-table th,
    .action-table td,
    .companies-table th,
    .companies-table td {
        padding: 0.4rem;
    }
}

/* ============================================
   WATERMARK
   ============================================ */

.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.03;
    overflow: hidden;
    font-size: 14px;
    font-weight: 300;
    color: var(--foreground);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.slide-up {
    animation: slideUp 0.4s ease;
}

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