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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 2rem;
}

.config-section {
    grid-column: 1 / -1;
}

.workflow-section {
    grid-column: 1;
}

.deploy-section {
    grid-column: 2;
}

.logs-section {
    grid-column: 1 / -1;
}

section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

section h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.status-info {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #f7fafc;
}

.status-ready {
    color: #38a169;
    font-weight: 600;
}

.status-error {
    color: #e53e3e;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled,
.form-group select:disabled {
    background-color: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-link {
    background: transparent;
    color: #667eea;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
    padding: 0.5rem;
    min-width: auto;
}

.btn-link:hover {
    background: rgba(102, 126, 234, 0.1);
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.log-container {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    height: 350px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid #2d3748;
}

.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    word-wrap: break-word;
}

.log-entry.info {
    color: #63b3ed;
}

.log-entry.success {
    color: #68d391;
}

.log-entry.error {
    color: #fc8181;
}

.timestamp {
    color: #a0aec0;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .workflow-section,
    .deploy-section {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .log-container {
        height: 250px;
    }
}

/* Novos estilos para deploy melhorado */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.deploy-options {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background-color: #f7fafc;
}

.deploy-options .form-group {
    margin-bottom: 1rem;
}

.deploy-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.deploy-options input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

#novoFluxoGroup {
    margin-left: 20px;
    padding: 10px;
    border-left: 3px solid #667eea;
    background-color: #edf2f7;
    border-radius: 0 8px 8px 0;
}

#atualizarFluxoGroup {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#atualizarFluxoGroup.disabled {
    opacity: 0.5;
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .log-container {
        height: 200px;
        padding: 1rem;
    }
}

/* Navegação principal */
.main-nav {
    margin: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

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

.nav-btn.active {
    color: white;
    border-bottom-color: white;
    font-weight: 600;
}

/* Seções de conteúdo */
.content-section {
    display: block;
}

.variables-section {
    padding: 20px 0;
    grid-column: 1 / -1;
}

.env-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.env-selector label {
    font-weight: 600;
    color: #333;
}

.env-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.variables-editor {
    margin-top: 20px;
}

.variables-editor h3 {
    color: #333;
    margin-bottom: 15px;
}

.variables-editor textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    background: #fafafa;
}

.variables-editor textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.example-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.example-section h4 {
    color: #333;
    margin-bottom: 10px;
}

.example-section pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    margin: 10px 0;
}

.example-section ul {
    list-style-type: disc;
    margin-left: 20px;
}

.example-section li {
    margin: 8px 0;
} 