/* VARIABLES & CORE DESIGN SYSTEM */
:root {
    --bg-dark: #0d0d12;
    --bg-card: rgba(22, 22, 31, 0.7);
    --bg-card-hover: rgba(30, 30, 42, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f7;
    --text-secondary: #9ea4b0;
    --text-muted: #626978;
    
    /* Instagram Gradient and Brands */
    --insta-grad: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --insta-pink: #cc2366;
    --insta-purple: #8a3ab9;
    --insta-blue: #0095f6;
    --insta-yellow: #fbad50;
    --insta-green: #25d366;
    
    /* Funnel Objective Colors */
    --color-conexao: #8a3ab9;
    --color-educacao: #0095f6;
    --color-objecao: #e6683c;
    --color-venda: #dc2743;
    
    /* Font sizes & margins */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* GENERAL STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

/* APP LAYOUT STRUCTURE */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 280px;
    background-color: #08080c;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-header .logo i {
    font-size: 24px;
    background: var(--insta-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
    margin-left: 36px;
    font-weight: 600;
}

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

.menu-item {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.menu-item.active i {
    color: #e6683c;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--insta-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.user-badge .info {
    display: flex;
    flex-direction: column;
}

.user-badge .name {
    font-size: 14px;
    font-weight: 700;
}

.user-badge .plan {
    font-size: 11px;
    color: var(--insta-yellow);
    font-weight: 600;
}

/* MAIN CONTENT AREA */
.main-content {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-dark);
    position: relative;
    padding: 30px;
}

/* PAGE SECTION CONTROLS */
.page-section {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
    display: block;
}

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

/* SECTION HEADER STYLES */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.section-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    background: linear-gradient(to right, #ffffff, #d3d3d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    outline: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--insta-grad);
    color: white;
    box-shadow: 0 4px 20px rgba(220, 39, 67, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 39, 67, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-back {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    padding: 8px 12px;
    border-radius: 8px;
}

.btn-back:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* SEARCH BAR */
.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.search-bar input:focus {
    border-color: rgba(230, 104, 60, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* FILTER TABS */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-dark);
    font-weight: 700;
    border-color: var(--text-primary);
}

.filter-btn[data-filter="Conexão"] i { color: var(--color-conexao); }
.filter-btn[data-filter="Educação / Conteúdo"] i { color: var(--color-educacao); }
.filter-btn[data-filter="Quebra de Objeções"] i { color: var(--color-objecao); }
.filter-btn[data-filter="Venda / Oferta"] i { color: var(--color-venda); }

/* ROTEIROS GRID & CARDS */
.modelos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.modelo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modelo-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(230, 104, 60, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.modelo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.modelo-card[data-objective="Conexão"]::before { background-color: var(--color-conexao); }
.modelo-card[data-objective="Educação / Conteúdo"]::before { background-color: var(--color-educacao); }
.modelo-card[data-objective="Quebra de Objeções"]::before { background-color: var(--color-objecao); }
.modelo-card[data-objective="Venda / Oferta"]::before { background-color: var(--color-venda); }

.card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-conexao { background: rgba(138, 58, 185, 0.15); color: #c07bf2; border: 1px solid rgba(138, 58, 185, 0.3); }
.badge-educacao { background: rgba(0, 149, 246, 0.15); color: #5bc0ff; border: 1px solid rgba(0, 149, 246, 0.3); }
.badge-objecao { background: rgba(230, 104, 60, 0.15); color: #ffa27e; border: 1px solid rgba(230, 104, 60, 0.3); }
.badge-venda { background: rgba(220, 39, 67, 0.15); color: #ff6d85; border: 1px solid rgba(220, 39, 67, 0.3); }

.card-stories-count {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.card-stories-count i {
    color: var(--text-muted);
}

.modelo-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.modelo-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

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

.btn-card-select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.modelo-card:hover .btn-card-select {
    background: var(--insta-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.2);
}

/* --- PREVIEW VISUAL DE STORIES NO DASHBOARD --- */
.mini-stories-preview {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.mini-stories-preview::-webkit-scrollbar { display: none; }

.mini-story-card {
    flex-shrink: 0;
    width: 72px;
    height: 128px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px;
    gap: 4px;
    position: relative;
    cursor: default;
    transition: all 0.2s ease;
    overflow: hidden;
}

.mini-story-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(230, 104, 60, 0.3);
    transform: scale(1.04);
}

.mini-story-bars {
    display: flex;
    gap: 2px;
    width: 100%;
}

.mini-bar {
    height: 2px;
    flex: 1;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.mini-bar.filled {
    background: rgba(255,255,255,0.9);
}

.mini-story-num {
    font-size: 8px;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-story-text {
    font-size: 8px;
    color: rgba(255,255,255,0.85);
    line-height: 1.35;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.mini-story-sticker {
    font-size: 16px;
    margin-top: auto;
    align-self: flex-end;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.mini-story-more {
    flex-shrink: 0;
    width: 72px;
    height: 128px;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 0;
}

.card-top {
    margin-bottom: 0;
}

.btn-card-select i {
    margin-right: 6px;
}

/* CONFIGURATION / VARIABLE SCREEN */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.form-container h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.form-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

.form-group-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--insta-pink);
}

.form-group input, .form-group textarea {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: rgba(230, 104, 60, 0.5);
    box-shadow: 0 0 0 2px rgba(230, 104, 60, 0.15);
}

.helper-text {
    font-size: 11px;
    color: var(--text-muted);
}

.config-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tips-card {
    background: linear-gradient(135deg, rgba(230, 104, 60, 0.1) 0%, rgba(204, 35, 102, 0.1) 100%);
    border: 1px solid rgba(230, 104, 60, 0.15);
}

.tips-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffa27e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-card p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tip-badge {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.tip-badge i {
    color: var(--insta-yellow);
    margin-top: 2px;
}

.variables-preview-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.variables-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

.variable-item .tag {
    font-family: monospace;
    font-weight: bold;
    color: var(--insta-blue);
    background-color: rgba(0, 149, 246, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.variable-item .val {
    color: var(--text-secondary);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 150px;
    font-weight: 500;
}

.variable-item.empty .val {
    color: var(--text-muted);
    font-style: italic;
}

/* SIMULADOR VIEW STYLES */
.back-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.view-selector-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.view-selector-tabs {
    display: flex;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.view-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

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

.view-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Modos de Exibição do Simulador */
.simulator-view-mode {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.simulator-view-mode.active {
    display: block;
}

/* Storyboard Sequencial */
.storyboard-instruction {
    background: linear-gradient(135deg, rgba(0, 149, 246, 0.08) 0%, rgba(138, 58, 185, 0.08) 100%);
    border: 1px solid rgba(0, 149, 246, 0.15);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.storyboard-instruction p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.storyboard-instruction p i {
    color: var(--insta-blue);
    font-size: 16px;
}

.storyboard-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-top: 10px;
}

.storyboard-grid {
    display: flex;
    gap: 20px;
    padding: 0 10px;
    width: max-content;
}

/* Card Individual do Storyboard (Mini-Celular) */
.storyboard-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 240px;
    flex-shrink: 0;
}

.storyboard-card-header-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.storyboard-card-header-label .step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.storyboard-card {
    height: 426px; /* Proporção 9:16 de 240px de largura */
    background-color: #000;
    border-radius: 28px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.storyboard-card .phone-screen {
    padding: 30px 14px 18px 14px;
    border-radius: 22px;
    height: 100%;
}

.storyboard-card .instagram-header {
    margin-bottom: 10px;
}

.storyboard-card .insta-avatar {
    width: 20px;
    height: 20px;
    font-size: 8px;
}

.storyboard-card .insta-name {
    font-size: 9px;
}

.storyboard-card .instagram-progress-bars {
    top: 24px;
    left: 14px;
    right: 14px;
    gap: 2px;
}

.storyboard-card .insta-bar {
    height: 1.5px;
}

.storyboard-card .story-content-overlay {
    top: 60px;
    bottom: 60px;
    left: 12px;
    right: 12px;
    gap: 12px;
}

.storyboard-card .story-text-container {
    font-size: 11px;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 6px;
}

.storyboard-card .story-stickers-container {
    gap: 10px;
}

/* Redimensionamento dos stickers no Storyboard */
.storyboard-card .sticker-depoimento, 
.storyboard-card .sticker-direct, 
.storyboard-card .sticker-foto-pessoal {
    padding: 5px 10px;
    font-size: 8px;
}

.storyboard-card .sticker-enquete {
    width: 130px;
    padding: 6px;
    border-radius: 8px;
}

.storyboard-card .enquete-question {
    font-size: 8px;
    margin-bottom: 4px;
}

.storyboard-card .enquete-opt {
    padding: 6px 0;
    font-size: 8px;
}

.storyboard-card .sticker-caixinha {
    width: 140px;
    border-radius: 12px;
}

.storyboard-card .caixinha-header {
    padding: 6px;
    font-size: 9px;
}

.storyboard-card .caixinha-body {
    padding: 8px;
}

.storyboard-card .caixinha-input {
    padding: 5px;
    font-size: 8px;
}

.storyboard-card .sticker-link-compra {
    padding: 6px 12px;
    font-size: 9px;
    border-radius: 16px;
}

.storyboard-card .sticker-link-compra i {
    font-size: 10px;
}

.storyboard-card .sticker-reacao {
    width: 130px;
    padding: 6px 10px;
    border-radius: 10px;
}

.storyboard-card .reacao-emoji {
    font-size: 14px;
    margin-bottom: 2px;
}

.storyboard-card .reacao-slider {
    height: 4px;
}

.storyboard-card .sticker-enquete-multipla {
    width: 130px;
    padding: 8px;
    border-radius: 10px;
}

.storyboard-card .multipla-question {
    font-size: 8px;
    margin-bottom: 4px;
}

.storyboard-card .multipla-opt {
    padding: 5px 6px;
    font-size: 8px;
    border-radius: 4px;
}

.storyboard-card .instagram-footer {
    display: none; /* Simplifica o rodapé no storyboard */
}

/* Ações dos cards no Storyboard */
.storyboard-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-storyboard-copy {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-storyboard-copy:hover {
    background-color: var(--insta-blue);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 149, 246, 0.2);
}

.storyboard-el-info {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.01);
    padding: 4px;
    border-radius: 4px;
    border: 1px dashed var(--border-color);
}

.simulator-layout {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 30px;
    height: calc(100vh - 160px);
    align-items: stretch;
}

/* Steps list sidebar (Left) */
.simulator-steps-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.simulator-steps-sidebar h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.steps-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.step-nav-btn.active {
    background: rgba(230, 104, 60, 0.12);
    border-color: rgba(230, 104, 60, 0.35);
    color: var(--text-primary);
}

.step-nav-btn .num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-primary);
}

.step-nav-btn.active .num {
    background: var(--insta-grad);
    color: white;
}

.step-nav-btn .info-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    overflow: hidden;
}

.step-nav-btn .step-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-nav-btn .step-el {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.step-nav-btn.active .step-el {
    color: #ffa27e;
}

/* Phone Simulator Viewport (Center) */
.simulator-viewport-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.simulator-phone-wrapper {
    width: 340px;
    height: 600px;
    background-color: #000;
    border-radius: 44px;
    padding: 10px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 25px;
    background-color: #000;
    border-radius: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-notch::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #111;
    margin-right: 15px;
}

.phone-screen {
    flex-grow: 1;
    border-radius: 36px;
    overflow: hidden;
    position: relative;
    background-color: #151515;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 20px 24px 20px;
}

/* Instagram simulation overlay elements */
.instagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.instagram-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.insta-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
}

.insta-user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.insta-name {
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.insta-time {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.instagram-actions {
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.instagram-progress-bars {
    position: absolute;
    top: 36px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.insta-bar {
    height: 2px;
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.insta-bar.filled {
    background-color: rgba(255, 255, 255, 1);
}

.insta-bar.active::after {
    content: '';
    display: block;
    height: 100%;
    background-color: white;
    width: 0;
    animation: barProgress 5s linear forwards;
}

@keyframes barProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.instagram-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    z-index: 5;
}

.message-input {
    flex-grow: 1;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 10px 16px;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.footer-icons {
    display: flex;
    gap: 12px;
    color: white;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Background image or color representation */
.story-background-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: var(--transition-smooth);
}

.story-background-media.bg-dark {
    background-color: #111116;
}

.story-background-media.bg-gradient-insta {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

.story-background-media.bg-gradient-purple {
    background: linear-gradient(135deg, #2b1055, #7597de);
}

.story-background-media.bg-gradient-dark {
    background: linear-gradient(135deg, #1f1c2c, #928dab);
}

.story-bg-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.1);
    padding: 40px;
    text-align: center;
    gap: 15px;
    border-radius: 36px;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.5);
}

.story-bg-placeholder i {
    font-size: 48px;
}

.story-bg-placeholder span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    line-height: 1.4;
}

/* Clickable phone navigations */
.phone-click-area {
    position: absolute;
    top: 80px;
    bottom: 80px;
    width: 25%;
    z-index: 10;
    cursor: pointer;
}

.click-left { left: 0; }
.click-right { right: 0; }

/* Overlay text and sticker container inside phone screen */
.story-content-overlay {
    position: absolute;
    top: 90px;
    bottom: 90px;
    left: 20px;
    right: 20px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    pointer-events: none; /* Let clicks pass to nav */
}

.story-text-container {
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    white-space: pre-wrap;
    width: 100%;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 8px;
}

.story-stickers-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: auto; /* Re-enable pointer events for stickers */
}

/* STICKER STYLES */
/* 1. Depoimento Tarja Rosa */
.sticker-depoimento {
    background-color: var(--insta-pink);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 2. Enquete SIM/NÃO */
.sticker-enquete {
    background-color: white;
    border-radius: 14px;
    padding: 10px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.enquete-question {
    font-size: 11px;
    color: #111;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
}

.enquete-options {
    display: flex;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eaeaea;
}

.enquete-opt {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    background: white;
    color: #0095f6;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.enquete-opt:first-child {
    border-right: 1px solid #eaeaea;
}

.enquete-opt:hover {
    background-color: #f7f7f7;
}

/* 3. Caixinha de Perguntas */
.sticker-caixinha {
    background-color: white;
    border-radius: 18px;
    width: 200px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.caixinha-header {
    background: linear-gradient(135deg, #ff007f 0%, #ff7f00 100%);
    padding: 10px 12px;
    text-align: center;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.caixinha-body {
    padding: 12px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.caixinha-input {
    width: 100%;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 10px;
    color: #888;
    background-color: #fafafa;
    text-align: center;
}

/* 4. Resposta de Direct (Tarja Roxa) */
.sticker-direct {
    background-color: var(--insta-purple);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 5. Foto Pessoal (Tarja Verde) */
.sticker-foto-pessoal {
    background-color: var(--insta-green);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 6. Sticker de Link Azul */
.sticker-link-compra {
    background-color: white;
    color: var(--insta-blue);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 15px rgba(0, 149, 246, 0.25);
    border: 1px solid rgba(0, 149, 246, 0.1);
}

.sticker-link-compra i {
    font-size: 13px;
    transform: rotate(-45deg);
}

/* 7. Reação Emoji (Slider) */
.sticker-reacao {
    background-color: white;
    border-radius: 14px;
    padding: 10px 14px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.reacao-emoji {
    font-size: 20px;
    margin-bottom: 6px;
}

.reacao-slider {
    width: 100%;
    height: 6px;
    background: #eaeaea;
    border-radius: 3px;
    position: relative;
}

.reacao-slider::after {
    content: '😍';
    position: absolute;
    top: 50%;
    left: 80%;
    transform: translate(-50%, -50%);
    font-size: 13px;
}

/* 8. Enquete Múltipla */
.sticker-enquete-multipla {
    background-color: white;
    border-radius: 16px;
    padding: 12px;
    width: 180px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.multipla-question {
    font-size: 11px;
    color: #111;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
}

.multipla-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.multipla-opt {
    background-color: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 10px;
    color: #333;
    font-weight: 600;
}

/* Simulator Control Panel (Right) */
.simulator-control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.control-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.control-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
}

.control-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.element-badge-container {
    margin-top: 10px;
    margin-bottom: 14px;
}

.element-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
}

.element-badge.badge-pink { background-color: var(--insta-pink); }
.element-badge.badge-white { background-color: #777; }
.element-badge.badge-white-pink { background: linear-gradient(135deg, #ff007f 0%, #ff7f00 100%); }
.element-badge.badge-purple { background-color: var(--insta-purple); }
.element-badge.badge-green { background-color: var(--insta-green); }
.element-badge.badge-blue { background-color: var(--insta-blue); }
.element-badge.badge-yellow { background-color: var(--insta-yellow); color: #111; }
.element-badge.badge-grey { background-color: #555; }

.story-instruction-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.btn-copy-text {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-copy-text:hover {
    background-color: var(--insta-blue);
    border-color: transparent;
    color: white;
}

#story-text-editor {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
    margin-bottom: 8px;
}

#story-text-editor:focus {
    border-color: rgba(230, 104, 60, 0.5);
}

.editor-help {
    font-size: 11px;
    color: var(--text-muted);
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customizer-options h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.bg-selector {
    display: flex;
    gap: 8px;
}

.bg-opt {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.bg-opt:hover {
    transform: scale(1.1);
}

.bg-opt.active {
    border-color: white;
    transform: scale(1.1);
}

/* CALENDÁRIO VIEW STYLES */
.calendar-actions {
    display: flex;
    align-items: center;
}

.calendar-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

.calendar-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.funnel-rules {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

.funnel-rules li {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.funnel-rules .badge {
    width: 80px;
    text-align: center;
}

.roster-card {
    background-color: var(--bg-card);
}

.roster-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 14px;
}

.roster-item {
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.roster-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.roster-item .title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.roster-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.roster-item[data-obj="Conexão"] .dot { background-color: var(--color-conexao); }
.roster-item[data-obj="Educação / Conteúdo"] .dot { background-color: var(--color-educacao); }
.roster-item[data-obj="Quebra de Objeções"] .dot { background-color: var(--color-objecao); }
.roster-item[data-obj="Venda / Oferta"] .dot { background-color: var(--color-venda); }

/* Calendar grid view */
.calendar-grid-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.calendar-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.month-nav {
    display: flex;
    gap: 8px;
}

.btn-month-nav {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-month-nav:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 90px;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.calendar-day:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.calendar-day.empty-day {
    background-color: transparent;
    border-color: transparent;
    pointer-events: none;
}

.calendar-day .day-num {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-secondary);
}

.calendar-day.today .day-num {
    color: #e6683c;
    background-color: rgba(230, 104, 60, 0.15);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(230, 104, 60, 0.3);
}

.calendar-day .scheduled-roster {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 4px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
}

.calendar-day .scheduled-roster.conexao { background: rgba(138, 58, 185, 0.2); color: #c07bf2; border: 1px solid rgba(138, 58, 185, 0.4); }
.calendar-day .scheduled-roster.educacao { background: rgba(0, 149, 246, 0.2); color: #5bc0ff; border: 1px solid rgba(0, 149, 246, 0.4); }
.calendar-day .scheduled-roster.objecao { background: rgba(230, 104, 60, 0.2); color: #ffa27e; border: 1px solid rgba(230, 104, 60, 0.4); }
.calendar-day .scheduled-roster.venda { background: rgba(220, 39, 67, 0.2); color: #ff6d85; border: 1px solid rgba(220, 39, 67, 0.4); }

.calendar-day .day-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    opacity: 0.1;
    transition: var(--transition-smooth);
}

.calendar-day:hover .day-actions {
    opacity: 1;
}

.btn-day-act {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-day-act:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-day-act.delete-act:hover {
    color: var(--insta-pink);
    background-color: rgba(220, 39, 67, 0.08);
}

/* GUIDE SCREEN STYLES */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 24px;
}

.guide-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.guide-card.full-width {
    grid-column: 1 / -1;
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pink-bg { background-color: rgba(255, 94, 151, 0.15); color: #ff5e97; }
.yellow-bg { background-color: rgba(250, 173, 80, 0.15); color: #fbad50; }
.purple-bg { background-color: rgba(138, 58, 185, 0.15); color: #c07bf2; }
.blue-bg { background-color: rgba(0, 149, 246, 0.15); color: #5bc0ff; }

.guide-card-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.guide-card-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.guide-card-body blockquote {
    border-left: 3px solid var(--insta-purple);
    padding-left: 14px;
    margin: 16px 0;
    font-style: italic;
    color: var(--text-primary);
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
}

.guide-card-body ul, .guide-card-body ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.guide-card-body li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.guide-card-body li strong {
    color: var(--text-primary);
}

/* Elements table */
.elements-table-wrapper {
    overflow-x: auto;
}

.elements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.elements-table th {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.elements-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.elements-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

.elements-table .badge {
    display: inline-block;
    width: 180px;
    text-align: center;
}

/* MODAL STYLES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #0f0f15;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 800;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-list-roteiros {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-roteiro-opt {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.modal-roteiro-opt:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(230, 104, 60, 0.3);
}

.modal-roteiro-opt .obj-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.modal-roteiro-opt[data-obj="Conexão"] .obj-dot { background-color: var(--color-conexao); }
.modal-roteiro-opt[data-obj="Educação / Conteúdo"] .obj-dot { background-color: var(--color-educacao); }
.modal-roteiro-opt[data-obj="Quebra de Objeções"] .obj-dot { background-color: var(--color-objecao); }
.modal-roteiro-opt[data-obj="Venda / Oferta"] .obj-dot { background-color: var(--color-venda); }

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: #1a1a24;
    border-left: 4px solid var(--insta-blue);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    animation: toastIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.toast.success {
    border-left-color: var(--insta-green);
}

.toast.info {
    border-left-color: var(--insta-blue);
}

.toast i {
    font-size: 16px;
}

.toast.success i { color: var(--insta-green); }
.toast.info i { color: var(--insta-blue); }

@keyframes toastIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { transform: translateX(50px); opacity: 0; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    .simulator-layout {
        grid-template-columns: 240px 1fr;
    }
    .simulator-control-panel {
        grid-column: 1 / -1;
        margin-top: 20px;
        height: auto;
    }
}

@media (max-width: 900px) {
    body {
        flex-direction: column;
        overflow: auto;
        height: auto;
    }
    .app-container {
        flex-direction: column;
        height: auto;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }
    .sidebar-header {
        margin-bottom: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .sidebar-header .subtitle {
        margin-left: 0;
        margin-top: 0;
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
    }
    .menu-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    .main-content {
        padding: 16px;
        height: auto;
    }
    .simulator-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .simulator-steps-sidebar {
        display: none; /* Hide steps in mobile to simplify */
    }
    .calendar-container {
        grid-template-columns: 1fr;
    }
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

/* AI Variations Styles */
.advanced-integration-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--insta-purple);
    display: flex;
    align-items: center;
    gap: 8px;
}

.advanced-integration-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.help-link {
    color: var(--insta-blue);
    text-decoration: none;
    font-weight: 400;
    margin-left: 8px;
}

.help-link:hover {
    text-decoration: underline;
}

.full-width {
    width: 100%;
}

.ai-variations-card {
    border: 1px solid rgba(138, 58, 185, 0.3);
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.4) 0%, rgba(20, 20, 20, 0.6) 100%);
}

.ai-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.btn-ai-generate {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(45deg, #8a3ab9, #e95950, #fccc63);
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ai-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 89, 80, 0.4);
}

.btn-ai-generate:active {
    transform: translateY(0);
}

.ai-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 12px;
}

.ai-loading-container.hidden {
    display: none;
}

.ai-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #8a3ab9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.ai-results-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-results-container.hidden {
    display: none;
}

.ai-variation-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
}

.btn-use-variation {
    margin-top: 8px;
    width: 100%;
    padding: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-use-variation:hover {
    background: rgba(255,255,255,0.2);
}

.ai-error {
    color: #ff4d4d;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    background: rgba(255, 77, 77, 0.1);
    border-radius: 8px;
}
