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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #334155;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3b82f6;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

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

/* Workflow Builder */
.workflow-builder {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 1rem;
}

.canvas {
    flex: 1;
    position: relative;
    background: #f8fafc;
    overflow: auto;
    min-height: 500px;
}

.workflow-step {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem;
    cursor: move;
    position: absolute;
    min-width: 200px;
}

.workflow-step.trigger {
    border-color: #10b981;
}

.workflow-step.action {
    border-color: #3b82f6;
}

.workflow-step.condition {
    border-color: #f59e0b;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.step-title {
    font-weight: 600;
}

.step-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.step-type.trigger {
    background: #d1fae5;
    color: #065f46;
}

.step-type.action {
    background: #dbeafe;
    color: #1e40af;
}

.step-type.condition {
    background: #fef3c7;
    color: #92400e;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 0.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .workflow-builder {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
    
    .nav-links {
        display: none;
    }
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
}

.stat-label {
    color: #64748b;
    margin-top: 0.5rem;
}

.workflow-list {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.workflow-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workflow-item:last-child {
    border-bottom: none;
}

.workflow-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}