/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estilos gerais */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

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

/* Header */
.header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.app-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.app-suffix {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-left: 0.25rem;
}

.app-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: -0.25rem;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 0.25rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

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

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

.api-status.loading {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.api-status.loading .status-indicator {
    background: var(--warning-color);
}

.api-status.loading .status-text {
    color: var(--warning-color);
}

.api-status.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.api-status.error .status-indicator {
    background: var(--error-color);
}

.api-status.error .status-text {
    color: var(--error-color);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.user-greeting {
    font-size: 0.875rem;
    font-weight: 500;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.user-icon {
    font-size: 0.875rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.text-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-input::placeholder {
    color: var(--text-secondary);
}

/* Input Actions */
.input-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

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

.btn-secondary {
    background-color: var(--card-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* Loader */
.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* BPMN Canvas */
.bpmn-canvas {
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.bpmn-canvas .bjs-container {
    width: 100% !important;
    height: 500px !important;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    max-width: 400px;
    line-height: 1.5;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-message.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .nav-section {
        display: none;
    }
    
    .app-name {
        font-size: 1.125rem;
    }
    
    .app-suffix {
        font-size: 1.125rem;
    }
    
    .app-tagline {
        display: none;
    }
    
    .header-right {
        gap: 0.75rem;
    }
    
    .user-greeting {
        display: none;
    }
    
    .api-status {
        padding: 0.375rem 0.75rem;
    }
    
    .status-text {
        font-size: 0.75rem;
    }
    
    .input-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .bpmn-canvas {
        min-height: 400px;
    }
    
    .bpmn-canvas .bjs-container {
        height: 400px !important;
    }
    
    .empty-state {
        height: 400px;
    }
}