/* ===========================
   MODULE SPECIFIC STYLES
   =========================== */

.module-container {
    max-width: 1000px;
    margin: 0 auto;
}

.module-header {
    background: white;
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.module-title-area h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.module-desc {
    color: var(--text-secondary);
    font-size: 16px;
}

.module-xp-badge {
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

/* ===========================
   LESSON SECTIONS
   =========================== */

.lesson-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lesson-intro {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.lesson-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.lesson-intro h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.lesson-intro p {
    font-size: 18px;
    opacity: 0.95;
}

/* ===========================
   TOOL CARDS
   =========================== */

.tool-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.tool-header i {
    font-size: 32px;
    color: var(--primary-color);
}

.tool-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.tool-description {
    margin-bottom: 24px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tool-description ul {
    margin: 16px 0;
    padding-left: 24px;
}

.tool-description ul li {
    margin: 8px 0;
}

.criteria-list {
    list-style: none !important;
    padding: 0 !important;
}

.criteria-list li {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 8px 0;
}

/* ===========================
   CALCULATOR
   =========================== */

.calculator-container {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
}

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

.calculator-container label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.calculator-container input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
}

.calculator-container small {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
    font-size: 14px;
}

.result-box {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    animation: slideUp 0.5s ease;
}

.result-box i {
    font-size: 48px;
    opacity: 0.9;
}

.result-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.result-value {
    font-size: 48px;
    font-weight: 800;
    margin: 12px 0;
}

.result-explanation {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
}

/* ===========================
   SCORING GUIDE
   =========================== */

.scoring-guide {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.scoring-guide h4 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--primary-color);
}

.scoring-section {
    margin: 24px 0;
}

.scoring-section h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.scoring-section h5 i {
    color: var(--primary-color);
}

.scoring-grid {
    display: grid;
    gap: 8px;
}

.score-item {
    background: white;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    border-left: 4px solid var(--primary-color);
}

/* ===========================
   CLIENT CLASSIFIER
   =========================== */

.client-classifier {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.client-classifier h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.import-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.import-info {
    margin: 16px 0;
}

.import-info details {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.import-info summary {
    font-size: 16px;
    padding: 4px 0;
}

.import-info summary:hover {
    color: var(--primary-dark);
}

.import-info code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.import-info ul {
    list-style: disc;
    color: var(--text-secondary);
    font-size: 14px;
}

.import-info ul li {
    margin: 4px 0;
}

#clientes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.cliente-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.cliente-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cliente-item-header h5 {
    font-size: 16px;
    color: var(--text-primary);
}

.cliente-item-header .btn-icon {
    color: var(--danger-color);
}

.cliente-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.score-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.score-input-group select {
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.cliente-total {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
    font-size: 18px;
}

.cliente-classification {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.cliente-classification.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.cliente-classification.silver {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: var(--text-primary);
}

.cliente-classification.bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.cliente-classification.basic {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.clientes-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-item i {
    font-size: 32px;
    margin-bottom: 8px;
}

.summary-item.gold i {
    color: #f59e0b;
}

.summary-item.silver i {
    color: #9ca3af;
}

.summary-item.bronze i {
    color: #d97706;
}

.summary-item.basic i {
    color: var(--text-light);
}

.summary-number {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0;
    color: var(--text-primary);
}

.summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===========================
   TUTORIAL BOX
   =========================== */

.tutorial-box {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-lg);
    margin: 20px 0;
    overflow: hidden;
}

.tutorial-header {
    padding: 16px 20px;
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.tutorial-header:hover {
    background: #2563eb;
}

.tutorial-header i.fas.fa-graduation-cap {
    font-size: 24px;
}

.tutorial-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.tutorial-header.open .tutorial-arrow {
    transform: rotate(180deg);
}

.tutorial-content {
    padding: 24px;
    background: white;
}

.tutorial-content h4 {
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-step {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
}

.step-icon {
    width: 36px;
    height: 36px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h5 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.step-content ul {
    margin: 8px 0 8px 20px;
    color: var(--text-secondary);
}

.step-content li {
    margin: 4px 0;
}

.example-box {
    background: white;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border-left: 3px solid var(--accent-color);
    font-size: 14px;
}

.dica-importante {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    display: flex;
    gap: 12px;
    border-left: 4px solid var(--accent-color);
}

.dica-importante i {
    font-size: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.dica-importante strong {
    color: var(--accent-color);
}

/* ===========================
   FICHA FORM
   =========================== */

.ficha-form {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
}

.help-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.help-icon:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.field-hint {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 6px;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.ficha-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
}

.ficha-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ===========================
   QUIZ CARD
   =========================== */

.quiz-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 3px solid var(--accent-color);
}

.quiz-container {
    margin-top: 24px;
}

.quiz-question {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.quiz-question p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.quiz-option {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    background: rgba(16, 185, 129, 0.1);
}

.quiz-option input[type="radio"] {
    margin-right: 12px;
}

/* ===========================
   PERSONAS
   =========================== */

.personas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.persona-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.persona-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.persona-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.persona-card h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.persona-trait {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.persona-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.persona-form input,
.persona-form textarea {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
}

/* ===========================
   SIGNALS LIST
   =========================== */

.signals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.signal-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--transition);
}

.signal-item:hover {
    background: rgba(16, 185, 129, 0.05);
}

.signal-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.signal-content {
    flex: 1;
}

.signal-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.signal-content p {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 12px;
}

.signal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
}

.signal-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===========================
   OBJEÇÕES
   =========================== */

.objecoes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.objecao-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-lg);
}

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

.objecao-header h5 {
    font-size: 16px;
    color: var(--text-primary);
}

.objecao-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.objecao-inputs input,
.objecao-inputs textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
}

/* ===========================
   JORNADA MAP
   =========================== */

.jornada-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stage-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stage-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.stage-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
}

.stage-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.stage-card textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    min-height: 80px;
}

/* ===========================
   OFFER CREATOR
   =========================== */

.offer-formula {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.formula-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.formula-step {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.formula-step h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.formula-step input,
.formula-step textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    margin-top: 8px;
}

.offer-preview {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.offer-preview h4 {
    font-size: 24px;
    margin-bottom: 16px;
}

.offer-preview-content {
    font-size: 18px;
    line-height: 1.8;
}

/* ===========================
   SCRIPTS LIBRARY
   =========================== */

.scripts-grid {
    display: grid;
    gap: 16px;
    margin: 24px 0;
}

.script-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.script-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-content {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

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

/* ===========================
   DASHBOARD FINAL
   =========================== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.metric-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.metric-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.metric-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===========================
   CHECKLIST
   =========================== */

.checklist-section {
    margin: 24px 0;
}

.checklist-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.observation-checklist,
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.checklist-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-item span {
    flex: 1;
    font-size: 16px;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lesson-intro {
        padding: 24px;
    }
    
    .lesson-icon {
        font-size: 48px;
    }
    
    .lesson-intro h2 {
        font-size: 24px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .result-box {
        flex-direction: column;
        text-align: center;
    }
    
    .result-value {
        font-size: 36px;
    }
    
    .cliente-scores {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
