/* style.css - Tutorial NFSe Interativo - Design Moderno */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #9b59b6;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #1a1a2e;
    --gray-color: #95a5a6;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header com logo e título CENTRALIZADO */
.header-logo {
    background: white;
    padding: 30px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.logo-container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-nfse {
    height: 100%;
    width: auto;
    max-width: 350px;
    transition: var(--transition);
}

.title-section {
    text-align: center;
    width: 100%;
}

.tutorial-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tutorial-title::before {
    content: '🎯';
    font-size: 1.8rem;
}

.tutorial-subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container principal */
.container {
    display: flex;
    min-height: calc(100vh - 160px);
    max-width: 1600px;
    margin: 20px auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: white;
}

/* Sidebar modernizada */
.sidebar {
    width: 320px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    z-index: 1;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.sidebar h2::before {
    content: '📋';
    font-size: 1.2rem;
}

.sidebar ul {
    list-style: none;
    padding: 15px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar ul li {
    padding: 18px 25px;
    cursor: pointer;
    border-radius: 0;
    margin-bottom: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

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

.sidebar ul li:hover::before {
    left: 100%;
}

.sidebar ul li:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--secondary-color);
    padding-left: 30px;
}

.sidebar ul li.ativo {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.sidebar ul li.ativo::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
}

/* Ícones dos passos */
.step-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
}

.step-title {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.step-number {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Conteúdo principal modernizado */
.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.content-header {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.step-info-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.current-step-info {
    flex: 1;
    min-width: 300px;
}

.current-step-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.step-count {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-count i {
    font-size: 0.9rem;
}

.step-status {
    color: var(--gray-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-progress-container {
    width: 100%;
    margin-top: 15px;
}

.step-progress {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
}

.step-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    width: 0%;
    transition: var(--transition);
    position: relative;
    border-radius: 4px;
}

.step-progress-bar::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Conteúdo do tutorial */
.tutorial-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tutorial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Container de imagem maior */
.image-full-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 20px 0 30px;
    min-height: 500px;
}

.tutorial-image-container {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
}

.main-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
}

.main-content img:hover {
    transform: scale(1.05);
}

/* Controles de imagem */
.image-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.image-nav-btn {
    background: white;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-nav-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.image-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.image-counter {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    background: white;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Descrição do tutorial */
.tutorial-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.tutorial-description a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px dashed var(--secondary-color);
    transition: var(--transition);
    padding: 2px 0;
}

.tutorial-description a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Exemplo modernizado */
.exemplo {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    border-left: 5px solid var(--warning-color);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
}

.exemplo strong {
    color: var(--warning-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.exemplo strong::before {
    content: '💡';
}

.exemplo span {
    color: #555;
    line-height: 1.6;
    font-size: 1.05rem;
    display: block;
    padding-left: 5px;
}

/* Navegação */
.tutorial-navigation {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
}

.btn-prev {
    background: #f8f9fa;
    color: var(--primary-color);
    border: 2px solid #e9ecef;
}

.btn-prev:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-next {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
}

.btn-next:hover:not(:disabled) {
    transform: translateX(3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn-finish {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    color: white;
}

.btn-finish:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Placeholder para imagens */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 40px;
    text-align: center;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

/* Status da imagem */
.image-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    display: none;
}

/* Responsividade */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        margin: 10px;
        min-height: auto;
    }
    
    .sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 15px;
    }
    
    .sidebar ul li {
        min-width: 250px;
        flex-shrink: 0;
    }
    
    .image-full-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .header-logo {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .logo-container {
        height: 60px;
    }
    
    .logo-nfse {
        max-width: 280px;
    }
    
    .tutorial-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .tutorial-title::before {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .tutorial-subtitle {
        font-size: 1rem;
        max-width: 90%;
    }
    
    .content-header,
    .tutorial-content,
    .tutorial-navigation {
        padding: 20px;
    }
    
    .tutorial-card {
        padding: 20px;
    }
    
    .image-full-container {
        min-height: 300px;
    }
    
    .step-info-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .sidebar h2 {
        font-size: 1.2rem;
    }
    
    .image-controls {
        gap: 15px;
    }
    
    .image-nav-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        padding: 15px 10px;
    }
    
    .logo-container {
        height: 50px;
    }
    
    .logo-nfse {
        max-width: 240px;
    }
    
    .tutorial-title {
        font-size: 1.4rem;
    }
    
    .tutorial-subtitle {
        font-size: 0.9rem;
    }
    
    .image-full-container {
        min-height: 250px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-card {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideProgress {
    0% { width: 0%; }
    100% { width: var(--progress-width); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(transparent, var(--secondary-color), transparent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(transparent, var(--accent-color), transparent);
}

/* Status indicators */
.status-completed {
    color: var(--success-color);
}

.status-current {
    color: var(--secondary-color);
    font-weight: bold;
}

.status-pending {
    color: var(--gray-color);
}


.nfse-downloads {
    background: #f4f7fb;
    border: 1px solid #d9e2f1;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.btn-download.excel {
    background: #1D6F42;
    color: white;
}

.btn-download.json {
    background: #2b579a;
    color: white;
}

.btn-download:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.sidebar-downloads {
    margin-top: 25px;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.sidebar-downloads-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}

.sidebar-btn.excel {
    background: rgba(29,111,66,0.2);
    color: #8affc1;
}

.sidebar-btn.json {
    background: rgba(43,87,154,0.2);
    color: #9cc7ff;
}

.sidebar-btn:hover {
    transform: translateX(4px);
    background: rgba(255,255,255,0.08);
}
